Git for the impatient & ignorant like me.

Git is a revision control software. If you make many revisions to a file or set of files, then you need it. It can help you extract previous/latest versions of the file(s) you are working on. Git can be used in 2 different ways:

  1. Single editor mode: You are the sole owner and editor of a file or a set of files.
  2. Multiple editor mode: There are many editors who are improving a common file or set of files.

Single Editor Mode

Initialization:

  1. With(out) the command prompt, move all files & directories a directory which for the sake of this example we will call “repository”. Go to the folder through command prompt.
  2. Type “git init”
  3. Type “git add .”
  4. Type “git commit” and enter a message in the editor and save the file.

Basic workflow:

  1. When you start working, you go to the “repository” directory and type “git checkout” to get the latest version of all your files into that directory.
  2. You make changes to those files and add new files as necessary.
  3. Type “git commit -a” and enter a message in the editor and save the file.

Multiple editor mode

When there are many editors who work on a set files as a team, there 2 ways your team can be organized:

  1. Blackboard mode: A common repository of file(s) which any team member can edit and add new files to. There might be gate keepers who will first verify the sanity of the changes you submit to the repository.
  2. Circle of Trust mode: There will be a leader for your team. This leader will have a circle of trust, that is, a group of people who are allowed to make changes to his set of files. If you are not in the leader’s circle of trust, as a team member you will be in the circle of trust of one of his subordinates or sub- subordinates etc. Each circle of trust will have a common repository to which you submit your changes.

(To be continued…)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s