Ask Your Question
2

What steps do I need to follow to use git push for a new remote branch?

asked 2022-03-22 11:00:00 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-07-11 20:00:00 +0000

ladyg gravatar image
  1. Create a new branch locally using the command git checkout -b <branch name>
  2. Make any desired changes to the branch and commit them using git commit -m "<commit message>"
  3. Add the new branch to your local repository's list of remote branches using git push --set-upstream origin <branch name>
  4. Push the changes to the remote repository using git push origin <branch name>
  5. If this is the first time pushing to the remote repository, you may need to authenticate with your GitHub or other Git hosting service credentials. Follow any instructions given on the command line to complete this process.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-03-22 11:00:00 +0000

Seen: 8 times

Last updated: Jul 11 '21