AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Git set upstream url10/10/2023 ![]() origin/new-feature use b c origin/new-feature RET RET. To get your local version of another remote branch, e.g. If you insist on naming that remote upstream, then you can do the same using git clone -origin upstream. When you clone a repository using git clone, then that automatically creates a local branch named master which has origin/master set as its upstream. ![]() However it is a bad idea to name a repository that is not the upstream origin. I think it is a good idea to stick to that convention, but I guess naming the upstream repository upstream also makes a lot of sense. The convention is to name the upstream repository origin. EDIT: now I know that Magit Forge is a thing.Īssuming you start with that remote setup, you can do first part of your question, syncing with upstream, like this: Pull requests aren't really a part of git, they're a github thing, so as far as I know there isn't an interface for PRs. Eventually you use github to make a pull request to upstream. Then you setup your fork to be your remote for pushing. I think the way your scenario is intended to be setup is that you clone the public repository to your local machine. Once the remote is configured, pushing is as simple as P p. pressing p will push to a remote you can choose or configure. From there, u will push to "upstream" which, like Tarsius said, is configured to where you cloned it from: origin/master. Assuming you have your commits ready, press P to enter the push menu. A dialog will ask you where to branch from (defaulting to the current branch), and for the name of your new branch.ĭo your work, and go back to the status buffer when done. In the status buffer press b to bring up the branching menu, and then press c to create a new branch. With magit, I would start the process with M-x magit-status or however you prefer to get there. Also, I realize that the above sequence may not be optimal so I'm open to changing the sequence. I have magit 2.12.1 and git 2.17.2 but I'm happy to update either if that will help. I've read the documentation but find it hard to follow. The last two git commands is what I'd like help with the most. I'm fine with the GUI github part but if that can be simplified, I'm interested in that as well. Then go to github and make the pull request via its GUI. create changes including commits within emacs. I then make a pull request by doing something like: git checkout -b new-branch It might be nice to be able to do that from within magit (emacs) but that isn't my question right now. Where upstream is set to the URL of the main repository. From the main repository on github, I created a fork on github and I keep the master branch of my fork up to date with the main repository by doing: git checkout master
0 Comments
Read More
Leave a Reply. |