grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

commit 8891f69fdbcd433f22b6de6d24593310790ec0c4
parent c21e6669f7993577eba58101636976101131aa3a
Author: pyratebeard <root@pyratebeard.net>
Date:   Fri, 15 Feb 2019 11:48:20 +0000

Commands for a forced push and update of local branch

Diffstat:
Mcoding/git.md | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/coding/git.md b/coding/git.md @@ -10,6 +10,17 @@ roll back hard git reset --hard <commit/tag> ``` +force push of a previous commit +``` +git push -f origin <commit_id>:<branch> +``` + +reset local branch after a forced-update (above) +``` +git fetch +git reset origin/<branch> --hard +``` + set username for [single repo][] ``` git config user.username 'name'