Skip to content
lamblin edited this page Apr 4, 2013 · 4 revisions

Setup

  • Do not fork the repository
  • Add your SSH key to GitHub (if not there already):
    • Go to your user profile,
    • Click on "Edit Your Profile"
    • Go to "SSH Keys" in the left column
    • Click on "Add SSH key"
    • The title does not really matter
    • The key itself is the content of your ~/.ssh/id_dsa.pub or ~/.ssh/id_rsa.pub. If neither of these files exist, you can generate it with ssh-keygen on a Unix / Mac OS X machine. For Windows, google the instructions.
    • Click on "Add key".
  • Clone the repo it as git clone [email protected]:nouiz/lisa_emotiw.git
  • Add to your PYTHONPATH: .../lisa_emotiw/
  • Add to your PATH: .../lisa_emotiw/scripts/common/ AND .../lisa_emotiw/scripts/common/<username>/

Directory structure of the repository

lisa_emotiw/
    emotiw/ (python package is named emotiw)
        common/
        <username>/
    scripts/   (scripts will typically import from emotiw. ... )
        common/
        <username>/

Git workflow

  • REPEAT ATTENTION: Do not fork the repository
  • The repository hosted on GitHub will be called origin. It can contain different branches, origin/master is the main one.
  • Your local clone can also have different branches, master is the main one. This local master branch can be different from origin/master at times.
  • Since every user will have her own sandbox for both scripts and Python modules, it is OK for everyone to work directly in the master branch, and push to origin/master.
  • If a user prefers working in a different branch, and merge regularly into the master, it is fine too. Just remember not to let your branch drift too much from central/master.
  • To get the latest version of the central/master branch: git pull should be enough, if you're also working on the master branch.
  • To add changes in your local master branch, you have to add the changes first, even if the files already exists (this is different from CVS, SVN, and Mercurial, among others), then you can commit, and then push:
    • git add -p will walk you through all the changes you have made that are not yet committed (or scheduled to be committed), allowing you to accept a change or reject it (in that case, it will not be discarded, it will simply not be scheduled for commit yet),
    • git commit will create a commit with currently scheduled changes,
    • git push will push all locally created commits to the corresponding branch on origin, you can also specify git push origin master if you have different branches you do not want to synchronize yet.
  • git commands are powerful, but not intuitive, and the hidden abstractions and concepts are not obvious. If you wonder how to do something with git, the best advice often come from googling "git how to ...".
Clone this wiki locally