Working with Git¶
Commit Changes to A New Branch¶
For example, the current branch I’m working on is named master, and the other branch is named stable.
$ git checkout -b stableto switch to the new branch.
- Edit files and save.
$ git commit <file> -m "sync with master"to commit a single change to your local repo.
$ git push origin stableto push the change to the new branch on the Github.
Merge Changes into the Master Branch¶
The current branch I’m working on is named stable.
$ git checkout masterto switch to the master branch.
$ git merge stable.