Skip to content

Instantly share code, notes, and snippets.

@jshen28
Created October 27, 2018 11:55
Show Gist options
  • Save jshen28/69bb344d7804ba94953c875ee6d460b9 to your computer and use it in GitHub Desktop.
Save jshen28/69bb344d7804ba94953c875ee6d460b9 to your computer and use it in GitHub Desktop.
# from a directory with some stuff 
# but still want to push to an existing repository
git init
git add -A
git commit -m "some rants"

git remote add origin <origin url>
git pull orgin <branch> --allow-unrelated-histories

# deal with conflicts
# and then push to <branch>
git push origin <branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment