Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Wednesday, May 09, 2007

Git basics part 2

Thank God for Owie and that he's here in the office while I am trying to use Git.

You ALWAYS need to know if you're at the latest revision.  Two ways to check:
1. You could do this by checking the timeline on your Trac browser.  OR,
2. You could do a git-svn fetch :)

When you do a git-svn fetch, sometimes it looks like there's nothing going on but it implies that you're at the latest revision.

Things to note when committing files:
  1. Update first so that you're surely working with the latest revision.  If someone checks in his/her work 3 minutes ahead of you and you haven't updated, you might experience some errors.
  2. Commit to the local working directory first. (Difference with svn is that in svn you commit it directly to the repo when you're using svn.)
    • command: git-commit -a
  3. Merge/commit the one you have on your working directory with the central svn repo.  Note that if you forget to do #1, you might get an error. If you forget to do #2, you might get an error as well.
    • command:  git-svn dcommit

Git basics

Got these things from Owie:

link: http://utsl.gen.nz/talks/git-svn/intro.html#howto-track-svn

Tips:
Updating tree from SVN

Essentially equivalent to an svn up

   * git-svn fetch
   * git rebase remotes/git-svn


Also:
  1. Create a new directory where the project will be checked out.

  2. Initialize the newly-created directory: git init-db

  3. git-svn init [path of your repo]

  4. Fetch HEAD from SVN. Please take note that Git does not accept 'HEAD' - you will need to derive the exact revision that corresponds to HEAD: git-svn fetch -r xxxx

  5. git checkout master



I've been putting off using git for a while but I am trying to practice using it now.

Labels

Blog Archive

Connect