current status:
We have a remote repository and a local project repository with no git configured. We want to push to remote and create new branch.
Procedures:
- Set up ".gitignore" file.
- "git init" in local repo.
- git checkout -b <new-branch>
- git add .
-
git config --global user.email "you@example.com" (use --local if you only want this takes effect on this particular repo)
git config --global user.name "Your Name" - git commit -m "commit-msg"
- git remote add <remote-name> <remote-url> (usually the remote-name is set to 'origin')
- git push -u <remote-name> <new-branch>
-
git commit -m "commit-msg"