Thursday, December 13, 2012

GIT for beginners (and me)

Starting working with GIT ( I'm currently using SVN and I used in the past ClearCase rip) .
Here are some useful commands :

  • git init    - for initializing the .git/  repository in your current directory
  • git status -  return which files should be committed etc ...
  • git add  - mark files for the repository , so you remember to commit them later on. Those file will become candidate for commit
  • git add \*.java  - will add recursively ALL the java files 
  • git commit -m "My comment about this commit"  - obvious
  • git branch -b BranchName  - switch to the BranchName branch
  • git checkout -b NewBranchName  - copy your current branch into another NewBranchName
  • git branch - show all your defined branches and indicate what is your current branch
  • git reset --hard HEAD  - revert to the HEAD version, overwirting any local change (hard)
  • git merge show_michael  (didn't use it yet)
Here are some good links (as it seems to me now that some bullet in my summary are incorrect)


Another tutorial suggested to me today :
http://pcottle.github.io/learnGitBranching/

And some interesting procedure for working with SVN while working with git:


git stash list  
git stash drop     <<== Delete stash
git stash list  
git status
git stash       <<== save in a stash backup all the dirty files (the one that were not committed. but not the ones which are not yet added only to git )
git stash list
git status
git checkout master   <<== go to master , when your current branch is clean (no stash anymore)
svn update    <<= update with SVN
git status
git add .       <<= this is the quick way to get it all your svn update to your git
git status
git commit -m "svn update"  
git status
git checkout oauth  <<== return back to your working branch 
git status
git merge master oauth  <<== merge, for getting all the SVN update (but using git now)
git status
git stash apply  <<== retrieve the stash dirty files ... 
git status
history

5 comments:

Anonymous said...

The program comes with full warranty 60 days
money back, so everyone can actually try this muscle building system for a few weeks and see the results without any risk at all.

When you've got added your details to the program, it is going to give you 3 diets to check out. In his new program Kyle Leon offers high quality information and offers a proven muscle building system that has been designed by renowned fitness models from around the world that have been adjusted and tested for a long time in order to provide the best results.

Here is my webpage ... Somanabolic Muscle Maximizer Reviews

Anonymous said...

However, these are the most functional for readers.

You can also find bible e - Book on the web to complete your quiet
time with God. It is sold through Click - Bank, considered the internet's most trusted digital marketplace.

Feel free to visit my page ... free pdf ebook download

Anonymous said...

Princess Wedding Dresses tcuts, and can help you become successful in generating a terrific online profit as
soon as possible. His album Homework shot to popularity as soon
as it got released in the year 1997. · The 3D technology in "TRON: Legacy" was developed post-"Avatar"
and represents the most advanced in the world today.

Here is my weblog; random access memories rar free

Anonymous said...

Somanabolic Muscle Maximizer program is optimized for the U.
The 62 page Somanabolic Weight Training program
that details the specific workouts you need to do depending on your somatotype (body type) in order to pack on lean muscle mass.
In his new program Kyle Leon offers high quality
information and offers a proven muscle building system
that has been designed by renowned fitness models from around the
world that have been adjusted and tested for a long time in order to provide the best
results.

Feel free to visit my site - Somanabolic Muscle Maximizer Results

Anonymous said...

Anyhow, the Somanabolic Muscle Maximizer is unique from the feeling that
it's not a normal exercise application but a specific one particular which helps various folk attain their diverse health and fitness targets. These days there are virtually 1000's of guys and
females who are seeking to create muscle mass and strip off body body fat in purchase to transform the way their bodies' glimpse and really feel. In his new program Kyle Leon offers high quality information and offers a proven muscle building system that has been designed by renowned fitness models from around the world that have been adjusted and tested for a long time in order to provide the best results.

Have a look at my weblog ... Muscle Maximizer Review