User Tools

Site Tools


howto:github-forking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:github-forking [2022/03/28 21:02] Wulf Rajekhowto:github-forking [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 <markdown> <markdown>
-Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.+Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hang-ups in a different place, and so on.
  
-In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.+In an attempt to collate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
  
 ## Creating a Fork ## Creating a Fork
  
-Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or just head straight to the command line:+Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favourite git client to clone your repo or just head straight to the command line:
  
 ```shell ```shell
 # Clone your fork to your local machine # Clone your fork to your local machine
-git clone git@github.com:USERNAME/FORKED-PROJECT.git+git clone https://github.com/USERNAME/PROJECT-NAME
 ``` ```
  
Line 20: Line 20:
  
 ```shell ```shell
 +cd PROJECT-NAME
 # Add 'upstream' repo to list of remotes # Add 'upstream' repo to list of remotes
 git remote add upstream https://github.com/UPSTREAM-USER/ORIGINAL-PROJECT.git git remote add upstream https://github.com/UPSTREAM-USER/ORIGINAL-PROJECT.git
Line 167: Line 168:
 * [GitHub - Checking Out a Pull Request](https://help.github.com/articles/checking-out-pull-requests-locally) * [GitHub - Checking Out a Pull Request](https://help.github.com/articles/checking-out-pull-requests-locally)
 </markdown> </markdown>
 +
 +https://gist.github.com/Chaser324/ce0505fbed06b947d962
howto/github-forking.1648497773.txt.gz · Last modified: 2023/05/29 11:53 (external edit)