-
Notifications
You must be signed in to change notification settings - Fork 313
Home
wch edited this page Sep 11, 2012
·
22 revisions
Cloning this repository is the same as any with other git repository.
git clone https://github.com/wch/r-source.git
cd r-source
These are some useful commands on your mirror clone:
git branch -a # Show all branches (including remote branches)
git checkout origin/R-2-15-branch # Checkout a branch
git checkout origin/tags/R-2-15-1 # Checkout a tag (this is how svn tags are represented)
git checkout trunk # 'trunk' is the only local branch; it tracks mirror/trunk
# To get changes - just do the usual:
git pull
# Or do a 'git fetch' to get changes without changing the local checked-out copy:
git fetch
A clone of this git repository can also be configured to get changes from the R svn repository. This might be useful if you want to get the latest changes to svn that haven't yet been pushed to Github (this repository is updated once per hour).
# Set it up with svn.
# Prefix should match remote repo name with a trailing slash
git svn init --prefix=origin/ -s https://svn.r-project.org/R/
# Do 'git svn fetch' to fetch changes from the SVN repository.
# This will update the git repo, but not change the current checked-out commit.
# The first time will take a long time because it needs to match
# git commits with svn commits.
git svn fetch
# This does the same as a fetch, but also updates the current checked-out
# files to the latest revision on the branch.
git svn rebase