Skip to content

Getting started with Git

arpit edited this page Sep 13, 2010 · 7 revisions

Git is a rather new version control system that may be alien to a few of us. This page has a few getting started tips etc that may have come up in the mailing list or conversation.
Note this is only a small subset of Git concepts. Please refer to the Git Guides for more thorough documentation.

  • Git seems a bit unsupported on windows… Has anyone got any hints on using git/github with openpyro for windows?
    Check out msysgit for using Git on Windows. For seeing how to install it on windows see http://gitcasts.com/posts/git-on-windows
  • I want to make a few changes and I’m not sure if it’s the correct thing to do but I took a fork of your project on github
    Yep. If you are making any changes, fork the OpenPyro project on Github. If your changes fix/add to the core functionality, we will merge those changes back into OpenPyro head which is pretty easy to do. This is done by making a pull request when you are ready with your changes. To learn more about pull requests see here. You can also merge OpenPyro updates onto your repository if there are changes there you want to add. The idea is each respository can pull changes as needed.
  • is there any way to mark a branch as my preferred branch for github? Or do I need to merge it. What happened is that I went down the wrong approach in master and decided to branch since I read “branching is cheap”. Now I want to basically abandon what’s labelled as master and move forward with my other branch.

Its better to do the merge like this:


git checkout master
git merge better-approach
git push

(you may also want to delete github’s better-approach using `git push
origin :better-approach`)

But you could probably also do this:


git checkout better-approach
git push -f origin master

This would blow away github’s “master” history and replace with your local “better-approach” history. This will look a bit cleaner when viewing history, but it will delete any history for “master” that github has. And invalidate any clones that you or other people might
have of your master, so use with caution.

When in doubt, just zip up your project folder before starting since
your local .git folder should have all the history in it. That way you
can recover from mishaps without too much trouble.

Some good links to get you started: