From f7aec23756541cacadf8341e5d2e696005e0732f Mon Sep 17 00:00:00 2001 From: srdusr Date: Mon, 28 Nov 2022 21:27:45 +0200 Subject: Add git basics --- tools/git.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/git.md b/tools/git.md index 6b9b6f1..e71abec 100644 --- a/tools/git.md +++ b/tools/git.md @@ -1,4 +1,4 @@ -## Dotfiles +### Dotfiles - Intialize git and create a folder named ~/.cfg ```bash git init --bare $HOME/.cfg @@ -27,3 +27,27 @@ config push config submodule add https://github.com/user/repo.git .path/to/repo config submodule update --remote --merge + +- - - + +### Basic commands +Intialize a git repository in the root of the folder. +```bash +git init +``` +See which files git knows exist. +```bash +git status +``` +Add a new file to the repo. +```bash +git add +``` +Create a commit with a message about the commit. +```bash +git commit -m +``` +Push the changes/commits to our repo. +```bash +git push -u main +``` -- cgit v1.2.3