Tags:
tag this topic
create new tag
view all tags
---+ Git We have set up a common remote location for git repositories. These repositories are located on the netapp filesystem at =/ubc/cs/project/arrow/git=. Note that these should be _bare_ remote repositories, and in particular should not have an associated working copy. Members of the =klb= group should have permissions to work with repositories located here. *Important*: creators of / committers to Git repositories hosted here should ensure their default =umask= is =027= at most, to ensure that other =klb= users can read, write, and search their additions! To do this, edit either =~/.bashrc= or =~/.cshrc= (depending on whether you use BASH or CSh by default) and add the line =umask 027=. It is also a good idea, especially for windows code committers, to ensure they use Unix-style line endings. A concise introduction to remote Git repositories for CVS users, which is the basis for many of these instructions, can be found at: http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html A good cheat sheet for commandline git users is available at: https://git.wiki.kernel.org/index.php/GitCheatSheet ---++ Importing a CVS repository These instructions use the cvsimport script included with Git, and should be sufficient for migrating most papers, or other relatively simple repositories. A more powerful alternative involves use of cvs2git, and is not covered here. For example, to import a CVS repository located at =/ubc/cs/project/arrow/cvs/PAPER= to a Git repo at =ubc/cs/project/arrow/git/PAPER=: 1. Ensure your CVSROOT environment variable is set appropriately; eg: <blockquote> =export CVSROOT=/ubc/cs/project/arrow/cvs= </blockquote> 2. (optional) Ensure relevant authorship info is configured by editing =/ubc/cs/project/arrow/git/authors=. Authors not listed therein will be referred to in all logs by their UNIX username rather than their full name/email. 3. Import the repository to a temporary location, say =~/myrepo=: <blockquote> =git cvsimport -i -a -v -C ~/myrepo -A /ubc/cs/project/arrow/git/authors PAPER= </blockquote> 4. Create the remote repository (see next section) 5. Remove the temporary repository (unless you want to keep it as a local working repo) <blockquote> =rm -rf ~/myrepo= </blockquote> ---++ Creating a remote repository from an existing Git repository (Taken from http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html) We assume you have already created a git repository, for example by importing from CVS (above). Assume your existing Git repo is at =~/myrepo= on a machine with UBC network access. Create a new "bare" repository and fetch your project into it: <blockquote> =$ mkdir /ubc/cs/project/arrow/git/myrepo= <br> =$ cd /ubc/cs/project/arrow/git/myrepo= <br> =$ git --bare init --shared= <br> =$ git --bare fetch ~/myrepo master:master= </blockquote> ---++ Using TortoiseGit (Windows) with remote repositories In order to install TortoiseGit: 1. Download and install Git for Windows from http://msysgit.googlecode.com/files/Git-1.7.0.2-preview20100309.exe. You should disable all the options for shell integration, as this doubles up on what Tortoise provides. It's very hard to get rid of once you've installed it so it's important to omit here. I'd also disable the extra icons, which are unnecessary but easy to remove. On the next screens, I kept the default options. 2. Download and install TortoiseGit from http://code.google.com/p/tortoisegit/ 3. After a restart, you should be able to clone a remote repository. A sample repository you can play with is located at: <blockquote> =git+ssh://okanagan.cs.ubc.ca/ubc/cs/project/arrow/git/Sample= </blockquote> You will need to provide SSH credentials for an account in =klb= group to access it. *Remember* to set the default =umask= of this account to (at most) 027, in order that others might see your work. NB: to set up a .ppk ssh key if you don't have one, see http://linux-sxs.org/networking/openssh.putty.html You should set your user info in TortoiseGit so commits are properly attributed; go to Settings>Git to do this. ---+++ TortoiseGit usage notes * many more commands are available in the TortoiseGit menu if you hold shift before right-clicking. For example, you must do this to delete a branch (=Shift+Rclick>TortoiseGit>Browse Reference=) ---++ Using TortoiseGit (Windows) with remote repositories In order to install TortoiseGit: 1. Download and install Git for Windows from http://msysgit.googlecode.com/files/Git-1.7.0.2-preview20100309.exe. You should disable all the options for shell integration, as this doubles up on what Tortoise provides. It's very hard to get rid of once you've installed it so it's important to omit here. I'd also disable the extra icons, which are unnecessary but easy to remove. On the next screens, I kept the default options. 2. Download and install TortoiseGit from http://code.google.com/p/tortoisegit/ 3. After a restart, you should be able to clone a remote repository. A sample repository you can play with is located at: <blockquote> =git+ssh://okanagan.cs.ubc.ca/ubc/cs/project/arrow/git/Sample= </blockquote> You will need to provide SSH credentials for an account in =klb= group to access it. *Remember* to set the default =umask= of this account to (at most) 027, in order that others might see your work. NB: to set up a .ppk ssh key if you don't have one, see http://linux-sxs.org/networking/openssh.putty.html You should set your user info in TortoiseGit so commits are properly attributed; go to Settings>Git to do this. ---+++ TortoiseGit usage notes * many more commands are available in the TortoiseGit menu if you hold shift before right-clicking. For example, you must do this to delete a branch (=Shift+Rclick>TortoiseGit>Browse Reference=) ---++ Eclipse and Git Git is popular. However, it doesn't always have the best UI. For example, the Eclipse plugin for Git is not as polished as that for CVS. That said, it is under active development (Eclipse itself is switching to Git) and if you use Eclipse Helios, the plugin is usable for many common cases (you still may have to fall back to the command line for more complex merging tasks). -- Main.ChrisNell - 23 Jun 2010
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r7
<
r6
<
r5
<
r4
<
r3
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r7 - 2010-09-21
-
ChrisNell
Home
Site map
BETA web
Communications web
Faculty web
Imager web
LCI web
Main web
SPL web
Sandbox web
TWiki web
TestCases web
BETA Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback