![]() I haven't used GitHub Desktop for a very long time, so I don't know exactly what happens if you check out a remote branch through the GUI – it may offer to create a local branch "3.x" named after the remote one, or it might not. ![]() (Though if you try to check out a non-existent local "3.x" branch, Git magically creates it from "origin/3.x".) ![]() You can still create a branch off it, it's just not automatic. However, at least using the command-line git tools, checking out a remote branch (whether it's "origin/3.x" or "upstream/3.x") is a temporary operation – it doesn't automatically create a local branch that you can work on, it only checks out a "detached" commit. to track someone else's development fork.) (This is more general than just "upstream", you can configure any number of remotes, e.g. Your desktop repo has full copies of all branches from the upstream repo (as of the last fetch) and you can check out their commits, create local branches off them, merge or cherry-pick individual commits into a local branch, etc. If the upstream repo has some commits ahead of my fork on the 3.x branch and I click on upstream/3.x, does my working directory somehow gain the changes from those upstream commits? 121 70 49.99 379 94 When comparing GitHub Desktop vs Fork, the Slant community recommends Fork for most people. For example, you might integrate the newest upstream changes by merging "upstream/3.x" into your local "3.x", then push to your GitHub fork's "origin/3.x". Git repositories aren't limited to having a single URL to push/pull from – it is very common to have two when working with forks, and to directly fetch commits and branches from both. You can go to History and use the Select Branch to Compare option at the top of the commit list to select a branch to compare to your current branch. (Neither the "origin/" branches nor "upstream/" ones are actually local to the repo that GH Desktop is showing they're only locally cached copies of remote branches.) danielniccoli in GitHub Desktop the upstream branches are available from the branches list, allowing you to merge changes from upstream and keep your fork in sync. The cloned repository that you have on your desktop is fully separate from the fork that you have on GitHub – it has its own branches and everything. You're not only working on a fork you're working on a fork of the fork. How is it possible that I could switch to a branch on the upstream repo if I'm working on a fork? Instructions Copy the URL (Pro Tip: you can click the clipboard icon on the right to copy automatically) Open Github Desktop, and click on the File menu and. Diverging is expected, so the branches downloaded from a remote repository are always namespaced with "reponame/", while Hg's docs imply that a diverged bookmark is supposed to be dealt with quickly.) Though it seems that Git branches aren't kept as strictly in sync with the remote repository as Hg bookmarks are. And similarly, when you create a new local branch off "master", it's just creating a second bookmark that points to the same commit as "master". branch) is updated to point to them, so now both the local and remote bookmarks independently point to the same commit. (In fact, that's what happens when you push to GitHub – first the commits are uploaded, and then the remote repository's "main" or "master" bookmark (i.e. They're not immutably attached to commits but act as flexible pointers to some commit ID (see Mercurial's Bookmarks docs), so it is entirely possible for several repositories to have their own bookmarks pointing to the same commit. Git branches work like Mercurial's bookmarks. ![]() To create a draft pull request, use the drop-down and select Create Draft Pull. LogsĪttach your logs by opening the Help menu and selecting Show Logs., if applicable.(but bear in mind I come from a Mercurial background so maybe I'm not fully understanding Git's branches - I think they exist outside the version control somehow?). To create a pull request that is ready for review, click Create Pull Request. ScreenshotsĪdd screenshots to help explain your problem, if applicable. The 'To contribute to the parent repository' option is selected. I would expect the 'For my own purposes' option to be selected, or an error message if there was a failure with the selection. See that the incorrect option is selected.GitHub Desktop Version 2.6.1 Steps to reproduce the behavior If I then select the 'For my own purposes' option, click 'Save', and then re-open the dialog, the incorrect 'To contribute to the parent repository' option is selected again. ![]() However, if I then go to 'Repository -> Fork behaviour' the 'To contribute to the parent repository' option is selected. I have forked a public repository and cloned to GitHub Desktop, when prompted with the 'Fork behaviour' dialog, I selected 'For my own purposes'. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |