Handbook
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| git init
git config --global user.name <your-name> git config --global user.email <your-email> git config --global init.defaultBranch main
git clone <repository-url>
git add <file>
git add
git diff
git commit -m "Message" git commit --amend --no-edit
git reset
git status
git rm <file>
git log
git log --graph
git show <commit-hash>
git branch -a
git branch <branch-name>
git branch -m <new-branch-name>
git branch -d <branch-name>
git checkout <branch-name>
git checkout -b <branch-name>
git merge <branch-name>
git remote add <name> <repository-url>
git push <remote> <branch>
git pull <remote>
git gc
git stash
git stash apply
git fetch --all --prune
|
Errors
try to create or update ~/.ssh/config
as followed:
1 2 3
| Host github.com Hostname ssh.github.com Port 443
|
Then, run the command ssh -T git@github.com
to confirm if the issue is fixed.