Updated over 11 years ago by Knödlseder Jürgen
If you don’t have a GitHub account, go to the GitHub page, and make one.
You then need to configure your account to allow write access - see the Generating SSH keys help on GitHub Help.
As next step you need to create a fork of gammalib on GitHub. The instructions here are very similar to the instructions at http://help.github.com/fork-a-repo/ - please see that page for more details. We’re repeating some of it here just to give the specifics for the GammaLib project, and to suggest some default names.
The following example shows how to fork the GammaLib repository:jknodlseder
)After a short pause, you should find yourself at the home page for your own forked copy of GammaLib (in this example https://github.com/jknodlseder/gammalib).
As next step, you have to clone your fork to your computer. Use the command
$ git clone git@github.com:user/gammalib.git remote: Counting objects: 22147, done. remote: Compressing objects: 100% (4911/4911), done. remote: Total 22147 (delta 17346), reused 21980 (delta 17179) Receiving objects: 100% (22147/22147), 80.25 MiB | 42 KiB/s, done. Resolving deltas: 100% (17346/17346), done.to clone the GammaLib repository from GitHub. Here,
user
is your GitHub user name.
Now connect your clone to the GitHub GammaLib repository so that you can fetch upstream modifications from the repo.
$ cd gammalib $ git remote add upstream git://github.com/gammalib/gammalib.git
upstream
here is just the arbitrary name we’re using to refer to the main GammaLib repository.
Note that we’ve used git://
for the URL rather than git
@. The git://
URL is read only. This means we that we can’t accidentally (or deliberately) write to the upstream repo, and we are only going to use it to merge into our own code.
You may verify that the connection has been established with
$ git remote -v origin git@github.com:jknodlseder/gammalib.git (fetch) origin git@github.com:jknodlseder/gammalib.git (push) upstream git://github.com/gammalib/gammalib.git (fetch) upstream git://github.com/gammalib/gammalib.git (push)
Your fork is now set up correctly, and you are ready to hack away.
It may sound strange, but deleting your own master
branch can help reduce confusion about which branch you are on. See deleting master on github for details.
To delete the master branch, type
$ git checkout devel Already on 'devel' $ git branch -D master error: branch 'master' not found. $ git push origin :master To git@github.com:jknodlseder/gammalib.git - [deleted] masterDon’t worry if you get the message
error: branch 'master' not found.
, this just signals that you never checked out the master branch.
You may do the same thing with the release
and integration
branches.