Tend to forget simple commands that I don't use so much and for improved productivity decided to write them down.
To make life easier for oneself, have different branches on different computers -- makes resolving easier, maybe.
On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 1 different commits each, respectively.
See where you diverged:
git reflog
More visual one-liner:
git log --graph --decorate --oneline $(git rev-list -g --all)
git revert SHA
from git log --graph --decorate --oneline
This will keep the reference logs:
git reset --soft HEAD@{n}
n
is from reflog
Hard reset will discard the reference logs.
git reset --hard HEAD@{n}
-
Rename on Remote host, e.g. https://github.com/akerge/cheat-sheets
-
Rename directory on local host
-
Set new URL using git
git remote set-url origin [email protected]:akerge/cheat-sheets.git
To have an adventure, follow this
I see that you didn't bother to RTFM. Anyways,
git branch -a
lists all
, -r
emote and local branches
-d
deletes a branch
-b
creates a new branch and checks out, 2-in-1