After selecting it, a modal would pop up, select URL and place the https link we copied from gitlab inside the URL field and select the destination folder. open GitHub Desktop from the file bar, select clone repository. I think a warning banner (dismissable) if the branch is tracking a remote with a different name might be useful, but it's probably not worth the effort for this niche case. Head over to your repository and select https and copy the link, ii. I'm going to go ahead and close this as there's probably not much that can be done in Github Desktop to resolve the confusion. Practically, though, it seems from the command line that the tracking a different remote has little impact since doing git push my-new-branch was creating the remote branch anyway. I'd gotten used to the previous way of doing it as that's a quick and easy way to make branches from a tag (and doesn't have these issues since there's no remote branch to track). So you're right, it appears the way I created the branch leaves it tracking the other branch, and the more correct way would be to do git checkout master git checkout -b my-new-branch. It then gets more confusing because Git Desktop is showing the commits I just pushed as local commits (can undo, no 'View on Github' in history view), even though if I browse to they're there on the named branch as expected. That's confusing because the second command is what you'd normally use to push a branch created with git -b my-new-branch as well. I tried again and found that both git push origin HEAD and git push origin my-new-branch both create the branch on the remote with commits on the branch I made. The git push always creates the new branch on the remote. 1 Answer Sorted by: 2 That error indicates that when you ran the git remote add command youre not in a directory which is a git repository. Seems like git being a bit strange, as I've used this technique from the command line before without having issues. Select the commit you would like to cherry-pick.Thanks for the clarification, that's good detail. In the list of branches, click the branch that has the commit that you want to cherry-pick. For more information, see Distributed Git - Maintaining a Project in the Git documentation. Some projects incorporate contributions by cherry-picking commits. You can use GitHub Desktop to pick a specific commit on one branch and copy the commit to another branch. Cherry-picking a commit in GitHub Desktop. denyNonFastForwards is enabled in shared repositories, so that you cannot. You can also use cherry-picking when collaborating with a team. You can use GitHub Desktop to revert a specific commit to remove its changes from your branch. git-init - Create an empty Git repository or reinitialize an existing one. For example, if you commit a bug fix to a feature branch, you can cherry-pick the commit with the bug fix to other branches of your project. You can also use cherry-picking to apply specific changes before you are ready to create or merge a pull request. If you commit changes to the wrong branch or want to make the same changes to another branch, you can cherry-pick the commit to apply the changes to another branch. You can cherry-pick a commit on one branch to create a copy of the commit with the same changes on another branch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |