Differences

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

Link to this comparison view

dcss:help:git [2014-12-10 00:41]
infiniplex [Installing git] Updated link to msysgit for Windows
dcss:help:git [2015-10-19 17:00] (current)
neil Replace gitorious with github, and a few updates for git 2.0
Line 31: Line 31:
 Developers (anyone with commit rights to the git repo): Developers (anyone with commit rights to the git repo):
  
-  $ git clone git@gitorious.org:crawl/crawl.git+  $ git clone ssh://git@github.com/crawl/crawl.git
  
 Other users: Other users:
- 
-  $ git clone git://gitorious.org/crawl/crawl.git 
  
 or by https: or by https:
-  $ git clone https://git.gitorious.org/crawl/crawl.git+  $ git clone https://github.com/crawl/crawl.git
  
 ''git clone'' clones the crawl git repository to your machine. When it's done, you have a full local copy of the crawl repository with all its history. ''git clone'' clones the crawl git repository to your machine. When it's done, you have a full local copy of the crawl repository with all its history.
Line 56: Line 54:
 For me, this reports: For me, this reports:
  
-  origin ssh://dshaligram@gitorious.org:crawl/crawl.git (fetch) +  origin ssh://dshaligram@github.com/crawl/crawl.git (fetch) 
-  origin ssh://dshaligram@gitorious.org:crawl/crawl.git (push)+  origin ssh://dshaligram@github.com/crawl/crawl.git (push)
  
 See all available branches in the repository: See all available branches in the repository:
Line 67: Line 65:
   $ git tag   $ git tag
  
-==== 4. Updating your repository with the latest changes from gitorious ====+==== 4. Updating your repository with the latest changes from github ====
  
 Use Use
Line 266: Line 264:
 So git wants to push the local master and stone_soup-0.5 branches to the corresponding remote branches; the master branch has no new local changes, whereas the 0.5 branch does (the new change is 976e722). So git wants to push the local master and stone_soup-0.5 branches to the corresponding remote branches; the master branch has no new local changes, whereas the 0.5 branch does (the new change is 976e722).
  
-By default, ''git push'' will push *all* your local branches to the corresponding branches on Gitorious. This is important to remember; if you had local commits on master, they would also be pushed. This behaviour can be changed (the option is called ''push.default'') if it bothers you.+In older versions of git, by default, ''git push'' will push *all* your local branches to the corresponding branches on Github. This is important to remember; if you had local commits on master, they would also be pushed. This behaviour can be changed (the option is called ''push.default'') if it bothers you.
  
 Once you're done working on 0.5, you can switch back to ''master'' with: Once you're done working on 0.5, you can switch back to ''master'' with:
Line 278: Line 276:
 ==== 8. SSH keys (for developers) ==== ==== 8. SSH keys (for developers) ====
  
-If you've been following along with the examples, you've probably noticed that all the password prompts when you push or pull from gitorious are wearing on your patience (this does not apply to users who've cloned using the %%git://%% or %%https://%% URL).+If you've been following along with the examples, you've probably noticed that all the password prompts when you push or pull from github are wearing on your patience (this does not apply to users who've cloned using the %%git://%% or %%https://%% URL).
  
-svn handles the problem of needing passwords all the time by caching the credentials you use the first time you enter them (for %%https://%% WebDAV svn access; svn does not cache credentials for svn+ssh). git does not cache credentials.+svn handles the problem of needing passwords all the time by caching the credentials you use the first time you enter them (for %%https://%% WebDAV svn access; svn does not cache credentials for svn+ssh). git does not cache credentials by default.
  
-To save yourself the pain of entering your password each time, you should create an ssh key and upload your public key to gitorious.+To save yourself the pain of entering your password each time, you should create an ssh key and upload your public key to github.
  
 Let's create an ssh key (if you already have a key, skip this step): Let's create an ssh key (if you already have a key, skip this step):
Line 290: Line 288:
 You can accept all the default options and use an empty passphrase for convenience (don't do this on an account you share with other people, or they can commit to crawl-ref too :P) You can accept all the default options and use an empty passphrase for convenience (don't do this on an account you share with other people, or they can commit to crawl-ref too :P)
  
-Once the key is generated, you'll have two files, ''id_rsa'' and ''id_rsa.pub'', in your ''~/.ssh'' (the .ssh directory in your home directory). ''id_rsa'' is your private key, and should not be shared or given to anyone else (or they can pretend to be you); ''id_rsa.pub'' is your public key, and this is what you'll upload to Gitorious.+Once the key is generated, you'll have two files, ''id_rsa'' and ''id_rsa.pub'', in your ''~/.ssh'' (the .ssh directory in your home directory). ''id_rsa'' is your private key, and should not be shared or given to anyone else (or they can pretend to be you); ''id_rsa.pub'' is your public key, and this is what you'll upload to Github.
  
-Go to gitorious, login, and click "Manage ssh keys", then "Add ssh key".+Go to githublog in and go to your profile, click "SSH keys", then "Add ssh key".
  
 Copy the one line in your ''id_rsa.pub'', and paste it into the text area. Hit Save when you're done. Copy the one line in your ''id_rsa.pub'', and paste it into the text area. Hit Save when you're done.
  
-Within a few minutes of uploading your key, you should be able to push/pull from gitorious without needing to reenter your password.+Within a few minutes of uploading your key, you should be able to push/pull from github without needing to reenter your password.
  
 Windows users (msysgit) can follow these exact same steps in a git bash prompt. Windows users (msysgit) can follow these exact same steps in a git bash prompt.
  
-You can also create a DSA key instead of an RSA key (or use an existing DSA key). Gitorious accepts both.+You can also create a DSA key instead of an RSA key (or use an existing DSA key). Github accepts both.
  
  
Logged in as: Anonymous (VIEWER)
dcss/help/git.txt · Last modified: 2015-10-19 17:00 by neil
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki