- make sure ur in the master branch by typing
git branch
- what ever branch you are in witll be green and have a * before it
- if you not in master commit any current changes then run
git chechout master
to switch to the master branch - Make sure your branch is up to date with github by running
git pull origin master
- Now your ready to create a new branch
- to create a new branch run
git checkout -b name-of-branch
- name your branch after the feature you will be working on
- you now are working in a new branch
- every time you stage changes and then commit you want to push your changes to your branch on github to keep it up to date.
- run the command
git push origin name-of-branch
- On Github, on the main page of your repository, navigate to the branches tab.
- Find your branch in the list and click the assosiated New Pull Request button.
- That will Open a new page
- Leave some short Comments about the why and what you did.
- click the Create Pull Request button
- On Github on the main page of your Repository, navigate to the Pull Requests Tab.
- click on the link to your open pull request.
- Now you are looking at an Open Pull Request
- Click on the Files Changed Tab and Review the changes to your code base.
- If the code will not break your project
- Switch back to the conversation tab
- Click Merge Pull Requeset
- then Click Confirm Merge
- then you can optionaly click Delete Branch
- If the code will break your project
- Switch back to the conversation tab
- Click Cancel Pull Requeset