Difference between revisions of "HowToGit"
From Lost In Wonderlands
(→useful commands) |
(→useful commands) |
||
Line 18: | Line 18: | ||
gitk | gitk | ||
gitk --all | gitk --all | ||
+ | |||
+ | git init | ||
+ | git clone | ||
git config --list | git config --list | ||
Line 44: | Line 47: | ||
git branch -m branchToRename newNameOfBranchToRename | git branch -m branchToRename newNameOfBranchToRename | ||
git branch --set-upstream-to=origin/nomBranchRemote nomBranchLocale | git branch --set-upstream-to=origin/nomBranchRemote nomBranchLocale | ||
+ | |||
+ | git tag | ||
git checkout | git checkout | ||
Line 71: | Line 76: | ||
git add -a | git add -a | ||
git add -p | git add -p | ||
+ | |||
+ | git rm | ||
+ | git mv | ||
+ | git grep | ||
git commit | git commit |
Revision as of 14:19, 28 January 2019
How To Git
NeXT Steps
here everything has yet to be done !
coming soon :
Everything You Always Wanted to Know on git [seldom]... (But Were Afraid to Ask)
a collection of links of interest
See also
useful commands
gitk gitk --all
git init git clone
git config --list
git log git log --oneline git log -- file git log --oneline <filePath>
git status
git stash git stash pop
git fetch git pull git pull --rebase
git branch git branch -a git branch -r
git branch -D <branchname> git branch -m newNameOfLocalBranch git branch -m branchToRename newNameOfBranchToRename git branch --set-upstream-to=origin/nomBranchRemote nomBranchLocale
git tag
git checkout git checkout -b <branchname>
git cherry-pick <commit sha1> git cherry-pick --abort
git merge
get rebase git rebase -i git rebase --interractive --onto
git reflog
git reset
git diff git difftool git mergetool git diff <filePath> git difftool <filePath>
git add git add -a git add -p
git rm git mv git grep
git commit git commit -m "commit message text" git commit -p git commit --amend
git push git push origin nomBranche
git stash git stash pop git stash clear git stash applymvnc
git reset --hard origin/<myRemoteBranch>
alias: git config --global alias.newCommand 'Commande en entier sans le "git"' Exemple : git config --global alias.unstage 'reset HEAD --' Usefull ones : git config --global alias.st 'status' git config --global alias.co 'checkout' git config --global alias.cp 'cherry-pick'
git rerere
git bisect
How-To
* how to get a file history git log -- <filePath> git log <filepath>
* using reflog and git reset to cancel actions * resetting
* cancelling the last pushed commit git revert
* cancelling the last commit (not yet pushed) git reset HEAD~
* resetting a local branch aftre the remote branch on the server git reset --hard origin/<myRemoteBranch>