- git init
- git add file.txt
- git status
- git add file.txt
- git status -s
- git status --short
- .gitignore
- *.a
- !lib.a
- /TODO
- build/
- doc/*.txt
- doc/**/*.pdf
- git diff --staged
- git diff --cached
- git diff
- git commit
- git commit -a
- git rm --cached file.txt
- git mv file.from file.to
- git log
- git log -p
- git log --patch
- git log -3
- git log --stat
- git log -S function_name
- git log -- path/file.txt
- git commit --amend
- git reset HEAD file.txt
- git checkout file
- git restore --staged file.txt
- git remote
- git remote -v
- git remote -v
add a new remote git repo named eureka located at https://eureka.git
- git remote add eureka https://eureka.git
- git fetch origin
- git fetch && git merge
- git push origin master
- git remote show origin
- git remote rename paul mike
- git tag
- git tag -l
- git tag --list
- git tag -l v1.8.5*
- git tag --list v1.8.5*
- lighweight annotated
- git tag -a v1.4 -m "hello world"
- git tag v1.4-lw
- git tag show v1.4
- git tag -a v1.4 9fceb02
- git push origin v1.4
- git push origin --tags
- git tag -d v1.4
- git push origin :refs/tags/v1.4
- git push origin --delete v1.4
- git checkout v1.4
- git switch -c v1.4
- git checkout -b version1.4 v1.4
- git branch my-branch
- HEAD
- git checkout my-branch
- git checkout -b my-branch
- git switch my-branch
- git switch -c my-branch
- git switch --create my-branch
- git merge hotfix
- git branch -d hotfix
- git branch
- git branch -v
- git branch --merged
- git branch --no-merged
- git branch --move bad-branch good-branch
- git push origin --set-upstream my-branch
- git push origin -u my-branch
- git push origin --delete my-branch
- git branch --all
- git remote show origin
- git push origin my-branch
- git push origin my-branch:the-other-branch
- git push origin -u my-branch:the-other-branch
your colleague created a new branch their-branch on remote origin, create a new branch my-branch from it?
- git checkout -b my-branch origin/their-branch
- git branch -u origin/their-branch
- git branch --set-upstream origin/their-branch
- git branch -vv
- git rebase master
- git diff --check
- git add --patch
- git add -p
- git log my-branch..origin/develop
- git log --no-merges
- git log --no-merges my-branch..origin/develop
- git merge --squash my-branch
- git diff master...my-branch
- git cherry-pick e43a6
- git describe master
- git show 2bdf86
- git show my-branch
- git reflog