You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ git stash (Push changes on to stack)
$ git stash apply (Pop changes from stack)
Revert
$ git revert <commit>
To revert a merge:
$ git revert -m 1 <hash>
Squash and rebase
$ export EDITOR="$VISUAL"
$ export VISUAL=vim
$ git log.
* df71a27 - (HEAD feature_x) Updated CSS for new elements (4 minutes ago)
* ba9dd9a - Added new elements to page design (15 minutes ago)
* f392171 - Added new feature X (1 day ago)
* d7322aa - (origin/feature_x) Proof of concept for feature X (3 days ago)
$ git rebase -i HEAD~3
pick f392171 Added new feature X
squash ba9dd9a Added new elements to page design
squash df71a27 Updated CSS for new elements
$ git push origin <branch> -f
Rebase to master
$ git checkout floating-pt-warn
$ git rebase origin/master
$ git tag v1.0 ec32d32
Where v1.0 is the tag name and ec32d32 is the commit you want to tag
Once done you can push the tags by:
$ git push origin --tags