public Question • 1 min read How do I rename a local Git branch? To rename the current branch: git branch -m <newname> To rename a branch while pointed to any branch:…
public Question • 1 min read How do I delete a Git branch locally and remotely? git push -d <remote_name> <branchname> git branch -d <branchname> Note: In most cases,…
public Question • 1 min read How to Undo a Commit in Git $ git commit -m "Something terribly misguided" # (0: Accidentally commited) $ git reset HEAD~ # (1) [ edit files as necessary ] # (2)…