git-tutorial/READMEINSTEAD.md

23 lines
831 B
Markdown
Raw Permalink Normal View History

# Hello World
git commit -a -m "Message"
This command adds all modified files, but not new ones, to a commit immediately.
If someone else already commit smth, pull it with
git pull -r
Now you start resolving conflicts. If there's a conflict, you gotta deal with it. Keep doing that till you're done
--> Happiness
continue with "git rebase --continue"
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"