Set user name and email on your local git.
NOTE: Make sure the username and email is the same used for the GitHub repo shared with the team for the project.
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Check config
git config --list
Clone the GitHub repository
This may work for you
git clone https://github.com/<GITHUB ADDRESS>
If the above code does not work for you (possibly on Windows or an older version of git), try this
FOR PRIVATE GITHUB REPOSITORY: You MUST include the username with collaboration permissions (i.e. the GitHub username you are using for this project)
The the syntax will be https://<YOUR_GITHUB_USERNAME>@github.com/<GITHUB ADDRESS>
git remote show origin
List branches
Git local branches only
git branch
Git remote branches
git branch -r
Git all branches (local and remote)
git branch -a
Create branch locally and switch to it
git branch <new-branch>
You must switch (or checkout on older versions of git) to the branch
git switch <new-branch-you-created>
Older versions of git used checkout
git checkout <new-branch-you-created>
Push branch to GitHub (it will create a branch with the same name)
MAKE SURE YOU ARE IN THE BRANCH YOU WANT TO PUSH LOCALLY (use checkout or switch)
git push origin <branch-name>
Rebase your branch when the dev branch have been updated with a merge
MAKE SURE YOU ARE IN THE BRANCH YOU WANT TO REBASE
git rebase origin/<branch_name>
50% Complete
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.