33
loading...
This website collects cookies to deliver better user experience
$ git config -l
$ git config --global user.name "Your name"
$ git config --global user.email "Your email"
$ git version
$ git init
$ git init <repo name>
$ git clone <your project URL>
$ git add file_name (adds a single file to the staging area)
$ git add * (adds all the modified and new files to the staging area)
$ git commit -m “commit message”
$ git status
$ git branch
$ git branch <branch_name>
$ git branch -D <branch_name>
$ git checkout <branch_name>
$ git checkout -b <your_new_branch_name>
$ git log
$ git log --oneline
$ git remote add <url>
$ git push origin <your_branch_name>
$ git push --set-upstream origin <branch_name>
$ git fetch
$ git pull <remote_url>
$ git stash
$ git stash list
$ git stash{3} apply
$ git shortlog
$ git show <your_commit_hash>
$ git rm <your_file_name>
$ git merge <diff_branch_name>
git rebase
command rewrites the commit history.$ git rebase <branch_name>
$ git bisect start
$ git bisect good a123
$ git bisect bad z123
$ git cherry-pick <commit-hash>
$ git archive --format zip HEAD > archive-HEAD.zip
git pull
command.$ git pull --rebase
$ git blame <your_file_name>
$ git tag -a v1.0.0
$ git verify-commit <commit>
verify-commit
, you can confirm a tag.$ git verify-tag <tag>
$ git diff HEAD <filename>
$ git diff <source branch> <target branch>
$ git citool
$ git mv <old-file-name> <new-file-name>
git reset
command.$ git clean
$ git help <git_command>
git whatchanged
command is same as git log but in a raw format. $ git whatchanged