I've made a git repo for MPIR, which can be viewed online here: http://selmer.warwick.ac.uk/gitweb/mpir.git
If you want to "checkout" the repo (the term used in Git is "clone") do: git clone http://selmer.warwick.ac.uk/mpir.git mpir-trunk (or simply use the clone feature of TortoiseGit with the given URL). I haven't given anyone ssh commit access to the repo on Selmer yet, but note that once you have checked out MPIR onto your local machine, you can make multiple commits locally to your machine and push them to the repo on Selmer later. When you are ready to start pushing commits to the Selmer repo, let me know and I'll give you a password. The preferred way to do things, if you have access to your own server, is to export your Git repo to the world (see notes below) and we'll just pull patches from you. If that doesn't work for you, providing ssh commit access to the Selmer repo is no problem. Remember also the catchphrase of Git, "branch early, branch often". In fact the first thing you should do is make a branch, to experiment in. Committing to the master (i.e. the default Git branch) is not recommended when you start working on a new idea. Make as many branches as you have ideas to work on, and merge branches together as needed. Note: making branches in mpir does not increase the amount of internet communication with the "central repo" as it does in svn. Git is decentralised. We'll see how things go. If all MPIR devels seem to want to use git and not svn, we'll switch entirely and abandon the svn repo. Otherwise we'll keep it and rebase the git repo regularly. Below is a list of commands to use with Git. If you are using Windows, you have to use GitBash to type these, but many of the features will have counterparts in the TortoiseGit GUI. Using Git ========= Clone ----- git clone http://selmer.warwick.ac.uk/project.git project-trunk Pulling changes from Selmer --------------------------- git pull Pushing changes back to Selmer (requires access privileges) ----------------------------------------------------------- git push --all Branch ------ git checkout -b mybranch Switching Branches ------------------ git checkout mybranch git checkout master (note it is not recommended to work directly on the master branch) Adding files to revision control -------------------------------- git add filename Deleting files under revision control ------------------------------------- git rm filename Committing changes ------------------ git commit -a Cherry-picking commits from one branch to another ------------------------------------------------- To see which commits are not in your current branch git cherry -v mybranch A + will be displayed against commits which you don't have yet, and - against ones you have that aren't in the branch git cherry-pick 08d7780de will then pick the commit whose SHA1 starts 08d7780de. You usually only need the first few characters of the SHA1 to identify a commit that you want to grab. Show all branches ----------------- git branch -a git branch -r (will show only remote branches) Merging a branch into the current branch ---------------------------------------- git pull . mybranch Rebase is dangerous ------------------- If you don't want to hose your repo, don't use it unless you have not shared any of the branches you are rebasing Removing branches ----------------- git branch -d mybranch Cloning remote branches ----------------------- When you clone a remote repo, only master shows up. To see all branches, type: git branch -a If you just want to look at a remote branch: git checkout origin/branchname If you want to work on it, you need to make a "local copy": git checkout -b mybranch origin/branchname Tracking a remote branch ------------------------ As you notice, when you clone a repo, your local repo has mirrors of the remote branches, and when you make a local branch of that, changes made to the remote branch only get reflected in the mirror of the remote branch, not in the new branch you created to work on, when you do git pull. To "track" a remote branch so that git pull will automatically merge changes to the remote branch into your new branch, do this: git checkout --track -b mybranch origin/branchname Exporting a Git repo (via http:) -------------------------------- Explained here: http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#public-repositories Assuming you have a git repo in directory project git clone --bare project project.git chmod 755 project.git cd project.git touch git-daemon-export-ok git --bare update-server-info Now get your sysadmin to copy the directory somewhere where it will be exported by http (usually /var/www on Ubuntu/apache or you can put it in your home dir on sage.math, etc) Bill. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en -~----------~----~----~----~------~----~------~--~---
