Use update if you need to sync a specific branch with its remote tracked branch. Watch this video to get a better view on how fetch operation is performed in IDE. There are two ways to fetch changes from the upstream:Īlternatively, open the Branches popup and click in the upper right corner. Since fetch does not affect your local development environment, this is a safe way to get an update of all changes to a remote repository. This new data is not integrated into your local files, and changes are not applied to your code.įetched changes are stored as a remote branch, which gives you a chance to review them before you merge them with your files. When you fetch changes from the upstream, all new data from commits that were made since you last synced with the remote repository is downloaded into your local copy. The Git branches popup indicates whether a branch has incoming commits that have not yet been fetched: Fetch changes You can do this in one of the following ways: fetch changes, pull changes, or update your project. And make a pull request if you wish for the initial otherProject maintainer to take that into account.Before you can share the results of your work by pushing your changes to the upstream, you need to synchronize with the remote repository to make sure your local copy of the project is up to date. If you make any evolution directly in myForkOfOtherProject, you will need to commit it, then go to the parent repo and commit it as well (see " true nature of submodules"). It won't be used for you to push back to otherProject (if you forked it, it is probably because you are not listed as collaborator). Note: creating an upstream in your submodule repo (as CodeGnome described, upvoted) is useful for you to update that submodule with the latest ofotherProject cd myForkOfOtherProject Will work (providing some additional settings) I couldn't do it from work (and I don't even mention ssh addresses: ssh is also blocked from work from "outside-the-LAN" remote addresses). Will only work if the git protocol (by default, port 9478) is aithorized. Git remote add upstream git:///otherUser/otherProject.git Git commands that you run inside the submodule are independent of the superproject, which is mostly interested in tracking the submodule's current commit ID. git/config files.įor all intents and purposes, you handle origin and upstream inside the submodule the same way you do for any other repository. The superproject and the submodule do not share their. There is no namespacing conflict, because a submodule is really just a normal git repository with some additional meta-information tracked in the superproject. Git remote add upstream git:///otherProject.git Just cd into the top-level directory of your submodule, and give it one the same way you did for the main repository. If you do need to create an upstream remote for your submodule, it's easy enough. there is no third-party repository upstream of your remote) then you don't need to worry about creating an upstream remote for the submodule. Assuming that the submodule is yours (e.g. git/config file and its own notion of origin. When you clone a submodule into your repository, it will have its own.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |