Checked out master branch, made changes. How now to create a new branch, commit changes, and push it to the remote?
Asked
Active
Viewed 6,273 times
5
-
1@JohnZwinck The link you posted is for creating a branch this question is for making a healthy brunch. Two VERY different things... – dustytrash Sep 08 '18 at 01:43
-
1I feel a little bad for editing and ruining the joke. – trentcl Sep 08 '18 at 02:27
1 Answers
13
Four steps to get your changes committed locally and get them pushed to your server:
Create a local branch and commit to it
git checkout -b your-shiny-branch
git add .
git commit -m "Your Message"
Push your branch to your remote (server)
git push -u origin your-shiny-branch
If you then need to do further commits, start from command #2 and omit the -u
flag during the git push
on step #4.
![](../../users/profiles/525179.webp)
everton
- 6,827
- 2
- 24
- 41