Featured Post

Did You Know About Text Compare in Flex Builder FTP Plugin For Eclipse

Eclipse never ceases to amaze me, I swear I learn something new every day. I have been using Eclipse with the CFEclipse plugin since around last May. Shortly after I started, I found the Eclipse FTP/WEbDav plugin and I added that to the stable as well. In all of the times that I have used the FTP tool I have never actually clicked on the files themselves in the FTP import/export – Select Resources tree. I have always just checked the file checkboxes that I wanted to FTP and went on with my business. Often I come across a file that shows up as needing synchronized and I am unsure as to what has actually changed in that file. Today I accidentally slipped and clicked on the file rather than the check box, lo-and-behold a Text Compare screen opened at the bottom of the tree displaying both the local and remote files and highlighting the changes between the two – This is Sweet! Technorati Tags: Eclipse CFEclipse FTP

Read More

Follow @dougrdotnet on Twitter

Git – Every Day Commands

Posted by dougr | Posted in Git | Posted on 06-01-2010 | 1,298 views

Tags: , , ,

0

I’ve been using Git, rather than SVN, for the past 6 months now.  There are many powerful and useful commands, yet there are only few that I actually use on a daily basis.  So, if you are newish to Git and want a quick guide, then here you go.

Seldom Used

Create A Repository:

$ mkdir myProject
$ cd myProject
$ git init

Adding Files To The Repository

You can, if you wish, use this command following the $ git init shown in the previous example.

$ cd myProject
$ git add .

Note the [ .] following [$ git add], that is a space and a dot which means add everything below ./ in the current directory.

Often Used

Performing a Commit

This command will commit all changed files, since last commit, and remove any deleted files.

$ cd myProject
$ git commit -a

This command will commit all changed files, since last commit, and remove any deleted files. The addition of -m will allow the addition of a commit message.

$ cd myProject
$ git commit -a -m "re #xxx I just referenced a ticket number and am providing change detail."

Undoing Changes

This command will undo all changes to a file which have occurred since the last commit.

$ cd myProject
$ git checkout HEAD^ path/to/myFile


Working Remote

Getting A Remote Git Repository

This command will clone a remote repository to a local directory location.

$ git clone git@remote.url.com /local/path/directory

Updating A Local Repository With All Remote Changes

$ git pull

Updating A Remote Repository With All Local Changes

$ git push

Those are the most common commands that I use for every project. There are allot more for special situations. The Git Docs are pretty good, a bit hard to read (in my opinion), but I became accustom to it pretty quickly. My transition from SVN was relatively painless, I was up and running on an existing remote project within a few hours.

HTH!

#100blogs challenge Day4 http://bit.ly/4MtAfx

Write a comment