Last active
June 10, 2019 04:09
-
-
Save kapilghimire/575f7885817770fd823a28e891a40a4a to your computer and use it in GitHub Desktop.
Git command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clean -fd | |
// to add notepadd++ as default editor | |
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" | |
// to reset your working directory to latest commit --- be sure what you are doing | |
git reset --hard HEAD | |
// rebase | |
git rebase -i HEAD~3 | |
git log --oneline | |
// adding files to last commit modifying last commit message | |
$ (some_branch) git commit --amend | |
// adding files to last commit no modifying last commit message | |
$ (some_branch) git commit --amend --no-edit | |
// no fast forward merge | |
git merge --no-ff <<branch name>> | |
// using diff tool | |
git difftool <<filename>> | |
// to copy last commit version of file to working directore | |
git checkout filename | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment