Git commands – most used

RMAG news

Save token

open git config by $git config -e and replace with your GitHub token

[remote “origin”]
url = https://<TOKEN>@github.com/P1sec/p1tsa.git
fetch = +refs/heads/*:refs/remotes/origin/*

Rapid fixups using autosquash

git commit –fixup=<HashOfCommitWhichNeedsToBeSquashed>
git rebase -i –autosquash <base commit>

Force push changes

git push –no-tags –set-upstream origin $(git rev-parse –abbrev-ref HEAD) –force

Leave a Reply

Your email address will not be published. Required fields are marked *