Created
December 4, 2020 14:07
-
-
Save Geoffrey-T/16816859a9a3f1948b8aabf4920fe5dd to your computer and use it in GitHub Desktop.
Git help kit
This file contains hidden or 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
| # Reset last commit (hard reset, without save changes) | |
| git reset --head HEAD^ | |
| # Reset last commit and keep changes in unstages files | |
| git reset --soft HEAD^ | |
| # Change original branch -> when you start your dev from the wront branch | |
| git rebase --onto goodBranch wrongBranch # wrongBranch is your wrong started branch | |
| # When you commit unneeded files and forgot to change your giignore file: | |
| git rm -r --cached . | |
| git add . | |
| git commit -m "fix gitignore" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment