background preloader

Version Control

Facebook Twitter

Gazler/githug. Tie Git Submodules to a Particular Commit or Branch « Two Guys Arguing. Tie Git Submodules to a Particular Commit or Branch While working on getting QUnit-CLI cleaned up and refactored a bit, I realized I needed to tie the example code in the Git repository to a particular version of QUnit.js (those guys are making changes too fast for me to keep up).

I have used SVN:externals prevsiously so Git submodules seemed like an obvious solution. A single submodule should allow me to keep QUnit-CLI inherently pointing to a particular revision of QUnit.js without requiring me to seperately document which version I was testing against. The man page for git-submodule as well as the Git Book chapter on Submodules do a good job of documenting the command with some simple examples, but none that were 100% clear for my needs. In addition, I need my Git submodule to point to a specific commit (or branch) so that everyone cloning my code consistently can run my examples w/o fear that a new commit on HEAD will break something. Step 1 : Add the submodule Step 4 : Clone Recursive. DebianSqueezeInstallation - Open wiki. Installing Gitorious on Ubuntu 11.04 | Coding Journal. This guide is based on the Ubuntu Installation Guide from the Gitorious Wiki, but it is a little outdated, so here’s my updated version.

Pretty much all of the following commands need to be executed as the superuser, so first of all we make ourselves root (alternatively you could prepend sudo to every command, but that is rather tiresome. I do not recommend to always work as root though, because that way you will incur the wrath of the invisible pink unicorn): $ sudo su [sudo] password for <username>: When installing all these packages, you will be asked for a MySQL root password, which you should remember, because you will need it later on. Apparently some of the gems required by Gitorious need at least RubyGems v1.4 to work, and Ubuntu 11.04 ships with v1.3.7, so you need to force-update RubyGems (“force” because usually you would update RubyGems through aptitude): $ REALLY_GEM_UPDATE_SYSTEM=1 gem update --system Now we can install all the necessary gems: Easy as pie.

And enable them: How to get Gitorious running on your own server « Erik On Rails. This is everything I’ve figured out so far about how to get Gitorious up and running on your own server. It’s not everything yet, but it’s a lot of stuff. OK, so first you want to install the dependencies. I think this are all of them, assuming you’ve installed the basic rails stuff: apt-get install librmagick-ruby libonig-dev gem install mime-types oniguruma textpow chronic BlueCloth Then make a place for Gitorious and download the code: mkdir /path/for/gitorious; cd /path/for/gitorious git clone cd mainline It’s a good idea at this point to read the HACKING file for informational purposes.

The next thing we need to do is create a git user. Adduser git Once we’ve created a user, we can create a place for your git repositories. Mkdir /path/to/repos chown git:git /path/to/repos You are going to need to add your database settings and gitorious configuration. Cp config/gitorious.sample.yml config/gitorious.yml nano config/gitorious.yml; What’s left to do: Git - SVN Crash Course. Welcome to the Git version control system! Here we will briefly introduce you to Git usage based on your current Subversion knowledge. You will need the latest Git installed; There is also a potentially useful tutorial in the Git documentation. This page is not maintained anymore! The up-to-date version of this tutorial is the GitSvnCrashCourse page at the Git wiki. The copy below might be better edited and nicer to read, but is likely to contain some advices and commands that may not match the current best practices anymore. How to Read Me In those small tables, at the left we always list the Git commands for the task, while at the right the corresponding Subversion commands you would use for the job are listed.

Before running any command the first time, it's recommended that you at least quickly skim through its manual page. Things You Should Know There are couple important concepts it is good to know when starting with Git. Repositories. Commiting That's it. Browsing Merging Going Remote. Why You Should Switch from Subversion to Git. You may have heard some hubbub over distributed version control systems recently. You may dismiss it as the next hot thing, the newest flavor of kool-aid currently quenching the collective thirst of the bandwagon jumpers.

You, however, have been using Subversion quite happily for some time now. It has treated you pretty well, you know it just fine and you are comfortable with it – I mean, it’s just version control, right? You may want to give it a second look. Not just at distributed version control systems, but at the real role of version control in your creative toolkit. In this article, I’m going to introduce you to Git, my favorite DVCS, and hopefully show you why it is not only a better version control system than Subversion, but also a revolutionary way to think about how you get your work done. Now, this isn’t really a how-to on Git – I won’t be going over a lot of specific commands or get you up and running. The Advantages of Being Distributed Becoming a Code Artist In Closing… Introduction to Git. Git Book - Basic Branching and Merging. Let’s go through a simple example of branching and merging with a workflow that you might use in the real world. You’ll follow these steps: Do work on a web site.

Create a branch for a new story you’re working on. Do some work in that branch. At this stage, you’ll receive a call that another issue is critical and you need a hotfix. Revert back to your production branch. Basic Branching First, let’s say you’re working on your project and have a couple of commits already (see Figure 3-10). Figure 3-10. You’ve decided that you’re going to work on issue #53 in whatever issue-tracking system your company uses.

. $ git checkout -b iss53 Switched to a new branch "iss53" This is shorthand for: $ git branch iss53 $ git checkout iss53 Figure 3-11 illustrates the result. Figure 3-11. You work on your web site and do some commits. . $ vim index.html $ git commit -a -m 'added a new footer [issue 53]' Figure 3-12. Now you get the call that there is an issue with the web site, and you need to fix it immediately. Nick Farina - Git Is Simpler Than You Think. It was about one year ago that we switched to Git. Previously, we used Subversion, through the Mac app Versions, which (rightly) holds an Apple Design Award. I made the executive decision to leave our comfy world of Versions because it seemed clear that Git was winning the Internet. There was much grumbling from my teammates, who were busy enough doing actual work thank you very much.

But I pressed forward. We signed up for accounts on Github. We learned how to type 'git push' and 'git pull'. We became more confident. It might as well have printed PC LOAD LETTER. “Not currently on any branch?!” Maintenance Required Git is not a Prius. By now we all know how to drive Git. Did you know the top result for “git tutorial” is this manpage on kernel.org? So instead let’s pull over, open the hood up, and poke around. The Basics We’ll run through some basic commands to make a repository for our examples: Now we have a git repository with one file and one commit, that is to say, one “version”.

Commits.