This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
git [2010/04/19 01:35] hef |
git [2013/06/13 21:25] walter |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== About ====== | ====== About ====== | ||
- | The acm has public git hosting at http://acm.cs.uic.edu/git. | + | The acm has member git hosting at http://acm.cs.uic.edu/git via a web interface. |
+ | Public Repos at https://acm.cs.uic.edu/git/public | ||
+ | ====== Issues (Current Running Version) ====== | ||
+ | * June 13, 2013 | ||
+ | * Does not allow for public visibility of public project, except for repos that you yourself have created. | ||
+ | * Not sure if this is just me, but it doesn't seem like you are able to submit pull requests to other's repos. (Not tested extensively though...) | ||
+ | |||
====== Creation ====== | ====== Creation ====== | ||
be connected to ACM | be connected to ACM | ||
Line 10: | Line 16: | ||
===== First time ===== | ===== First time ===== | ||
- | Create a directory called "git" in your home directory. | + | Create a directory called "git" in your home directory. In reality you can put a git project anywhere, but the web interface will only pick it up if it is in a directory called "git". |
mkdir -p git | mkdir -p git | ||
cd git | cd git | ||
+ | |||
===== Create project repo ===== | ===== Create project repo ===== | ||
Line 39: | Line 46: | ||
The syntax for this command is "push toBranch fromBranch" | The syntax for this command is "push toBranch fromBranch" | ||
git remote push origin master | git remote push origin master | ||
+ | ====== Collaborating ====== | ||
+ | ===== setup ===== | ||
+ | |||
+ | working on a project with a partner that has already started: | ||
+ | |||
+ | on acm, run these comands | ||
+ | ssh acm.cs.uic.edu | ||
+ | mkdir -p git/project.git | ||
+ | cd git/project.git | ||
+ | git init --bare | ||
+ | echo "my project is awesome" > description | ||
+ | touch git-daemon-export-ok | ||
+ | | ||
+ | |||
+ | on your local machine run these commands: | ||
+ | mkdir project | ||
+ | git init | ||
+ | git remote add origin ssh://acm.cs.uic.edu:~/git/project.git | ||
+ | git remote add friend http://acm.cs.uic.edu/git/friend/git/project.git | ||
+ | git remote update | ||
+ | git merge friend | ||
+ | | ||
+ | ===== working ===== | ||
+ | |||
+ | git add . | ||
+ | git commit | ||
+ | |||
+ | ==== Sharing changes ==== | ||
+ | |||
+ | git push origin master | ||
+ | | ||
+ | ==== getting updates ==== | ||
+ | |||
+ | git remote update | ||
+ | git merge friend | ||
+ | | ||
+ | ==== resolving conflicts ==== | ||
+ | |||
+ | git mergetool [-t vimdiff] | ||
+ | fix problems, then | ||
+ | git commit | ||