Last active
January 16, 2024 22:06
-
-
Save DieNand/fc212e1b5196cacdeb175b01f703acc6 to your computer and use it in GitHub Desktop.
Commands for initialize new git repo and set remote to one on github.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add origin https://github.com/user/repo.git | |
git add . | |
git commit "<insert message>" | |
git push | |
git pull | |
git branch --set-upstream-to=origin/master master | |
git merge origin/master --allow-unrelated-histories | |
git push | |
---------------------------------------------------------------- | |
If for whatever reason you need to fix some commits, these are handy | |
git rebase -i --root (rebases all commits on current branch) | |
git commit --amend --author="Author Name <[email protected]>" --no-edit (change author details) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment