Added some useful info about branches and force pushes

This commit is contained in:
MrPyriteMiner 2024-09-15 11:59:47 +02:00
parent ab01a4ed7d
commit b617a92a28
1 changed files with 10 additions and 1 deletions

View File

@ -11,3 +11,12 @@ then you can pmossibly change the commit message
then you can push
git log
exists as a log of what happened
if you're on another branch, you can get the changes from main by using this command:
git pull -r origin (Branch)
e.g. git pull -r origin main
Then you can pull that and fix the conflicts to then merge them again.
how to force push (dark arts, don't do that on master branch, ever)
git push -f
--> this says "No, my local history is correct. Delete everything else"