NOTE: Replace master with another branch name as needed.If you're not already on the desired branch, run this command: First, you must check out the branch that you want to merge another branch into (changes will be merged into this branch).You'll want to make sure your working tree is clean and see what branch you're on.If your local branch already exists on the remote, run this command:.This saves you from having to type out the exact name of the branch! NOTE: HEAD is a reference to the top of the current branch, so it's an easy way to push to a branch of the same name on the remote. If your local branch does not exist on the remote, run either of these commands:.git checkout -track origin/my-branch-name.Run this command to switch to the branch:. To get a list of all branches from the remote, run this command:. Switch to a Branch That Came From a Remote Repo
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |