![]() ![]() If you want to work in this branch and commit to it, you need to check out this branch just like before using git checkout dev. When you want to create a new branch from your main branch with the name “dev”, for example, use git branch dev-this only creates the branch. ![]() I’m not yet a very good git user in a team environment, but I can at least share this information.If you already have a branch on your local machine, you can simply check out or switch to that branch using the command git checkout. ![]() ![]() _overviews/scala3-book/ca-type-classes.md | 2 +. _overviews/scala3-book/ca-given-imports.md | 2 +. Update: Keeping your fork in syncĪs a “note to self”, these are some resources I read about in regards to keeping your fork in sync with the “upstream” master/main branch: Go to the link git gives you to complete the pull request processĪgain, if you need to create a pull request on Github, I hope this is helpful.Push the changes back to Github with git push origin my-improvements.Switch back to master (or main) with git checkout master.Use that branch with git checkout my-improvements.Create a new branch with git branch my-improvements.Clone that new project from your forked Github repo to your computer.Fork the project you want to contribute to.If you ever need to create a pull request on Github, I hope these notes are helpful. Summary: Creating a pull request on Github Technically that’s the end of the process until someone on the other end does something with your pull request, so you’re finished for now. Fill out that form and submit it to complete the pull request process.Īs of July, 2021, here’s an example of what the Github UI looks like when I submit a pull request on the Scala Documentation project: Now go to the URL Github gives you for your pull request. This is nice, because it now gives you the URL to go to where you can complete your pull request. Remote: Create a pull request for 'my-improvements' on GitHub by visiting: When you do this, you’ll see some output like this at the command line: First, you can list all of the project branches with this command: Next, cd into that project directory on your local filesystem. This makes the process of keeping your cloned repo in sync with the main repo much easier. Git clone In 2021 (I think), Github added a “Fetch Upstream” button/link on your cloned project page (which is now named “Sync fork” in 2023). When I clone a Github project, the command looks like this: Next, clone your forked Github project, i.e., git clone. When it’s done you’ll have a new repository in your list of Github repositories. That’s easy to do, just go to the web page for the project, click Fork, then wait while they fork is created. The first thing to do is fork a project on Github. Today was a very smooth process, so I thought I’d make these notes while they’re still fresh in my mind. That being said, I’ve done it a few times lately, so I’m getting better at it. As someone who has been writing books for ten years - such as the 2021 Scala Cookbook and Functional Programming, Simplified - I haven’t worked on many open source projects, so my ability to fork a Github project, pull it down, create a branch, push that branch back, and then submit a pull request are weak, at best. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |