List of basic commands to use during feature branch workflow.
Create feature branch
1
|
|
NOTE: The -b parameter means branch, it saves us having to use two separate git commands. Without this option we’d need to branch then checkout.
Now do lots of work on the new feature…
Find out what has changed
When finished working on the new feature find out what has changed.
1
|
|
Add changes to git
Either add each file manually using:
1
|
|
Or add all the files in the current directory.
1
|
|
Run git status
one more time to get a list of everything that is going to be committed.
NOTE: Accidentally added files can be removed using the command
git rm <filename>
Commit changes
Commit your changes with a meaningful message.
1
|
|
Push changes
Push the new feature up to github so we can do a pull request.
1
|
|
The new branch should now be visible on github and we can now issue a pull request.