You are here

Just a simple guide for getting started with git. no deep things ;)

create a new repository

create a new directory, open it and perform a
git init
to create a new git repository.

checkout a repository

create a working copy of a local repository by running the command
git clone /path/to/repository
when using a remote server, your command will be
git clone username@host:/path/to/repository

workflow

your local repository consists of three "trees" maintained by git. the first one is your Working Directory which holds the actual files. the second one is the Index which acts as a staging area and finally the HEAD which points to the last commit you've made.

add & commit

You can propose changes (add it to the Index) using
git add <filename>
git add *
This is the first step in the basic git workflow. To actually commit these changes use
git commit -m "Commit message"
Now the file is committed to the HEAD, but not in your remote repository yet.

pushing changes

Your changes are now in the HEAD of your local working copy. To send those changes to your remote repository, execute
git push origin master
Change master to whatever branch you want to push your changes to.

If you have not cloned an existing repository and want to connect your repository to a remote server, you need to add it with
git remote add origin <server>
Now you are able to push your changes to the selected remote server

branching

Branches are used to develop features isolated from each other. The master branch is the "default" branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion.

create a new branch named "feature_x" and switch to it using
git checkout -b feature_x
switch back to master
git checkout master
and delete the branch again
git branch -d feature_x
a branch is not available to others unless you push the branch to your remote repository
git push origin <branch>

update & merge

to update your local repository to the newest commit, execute
git pull
in your working directory to fetch and merge remote changes.
to merge another branch into your active branch (e.g. master), use
git merge <branch>
in both cases git tries to auto-merge changes. Unfortunately, this is not always possible and results in conflicts. You are responsible to merge those conflicts manually by editing the files shown by git. After changing, you need to mark them as merged with
git add <filename>
before merging changes, you can also preview them by using
git diff <source_branch> <target_branch>

tagging

it's recommended to create tags for software releases. this is a known concept, which also exists in SVN. You can create a new tag named 1.0.0 by executing
git tag 1.0.0 1b2e1d63ff
the 1b2e1d63ff stands for the first 10 characters of the commit id you want to reference with your tag. You can get the commit id by looking at the...

log

in its simplest form, you can study repository history using.. git log
You can add a lot of parameters to make the log look like what you want. To see only the commits of a certain author:
git log --author=bob
To see a very compressed log where each commit is one line:
git log --pretty=oneline
Or maybe you want to see an ASCII art tree of all the branches, decorated with the names of tags and branches:
git log --graph --oneline --decorate --all
See only which files have changed:
git log --name-status
These are just a few of the possible parameters you can use. For more, see git log --help

replace local changes

In case you did something wrong, which for sure never happens ;), you can replace local changes using the command
git checkout -- <filename>
this replaces the changes in your working tree with the last content in HEAD. Changes already added to the index, as well as new files, will be kept.

If you instead want to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it like this
git fetch origin
git reset --hard origin/master

useful hints

built-in git GUI
gitk
use colorful git output
git config color.ui true
show log on just one line per commit
git config format.pretty oneline
use interactive adding
git add -i

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
CesRulley (not verified) - Fri, 03/31/2017 - 00:01

Effets Secondaires Cialis 20 Levitra Where To Buy Stendra Ed No Physician Approval For Sale Birmingham Rhine Inc Viagra Where To Buy Xenical Propecia O Omnic Healthy Man Viagra Radio Xenical Online Pharmacy Levitra Media Pastilla Vente De Kamagra En Belgique Cheap Xenical Buying Clomid Buy Prevacid 24hr Buy Zithromax Online Usa Generic Viagra Vega Sildenafil Citrate Ordonnance Tadalis Sx Soft Singapour Generic Atomoxetine Licensed Mexican Pharmacy Online Viagra Chi Non Lo Puo' Usare Propranolol Cheap Levaquin Versus Amoxicillin Cialis 20 Mg Internet Price Of Zithromax Priligy Farmacias Ahumada Secure Medical Prozac Prices Buy Generic Cialis Durer Plus Longtemps Pour Les Hommes Where To Order Zoloft Buy Genuine Levitra Pneumonia Amoxicillin Cheap Prozac No Rx Buy Birth Control From Thailand Cephalexin Is A Strong Anti Biotic Buy Cheap Strattera Site Amoxil Storage Secure Ordering Provera Order cialis Cheap Femara Without Prescription Cialis Ou Acheter Buy Lasix Cheap Levitra Dana El Higado Amoxil Dose Calculator Online Viagra Can Canine Be Given People Amoxicillin Levitra 5 Mg How To Order Zithromax Online Pharmacies India Acheter Priligy Pilules Atomoxetine Hydrochloride Cialis Puo Non Funzionare Acheter Cialis Ligne Canada Compra Lasix Online Is Priligy Any Good 3000 Mg Amoxicillin A Day Lasix Prices Correct Viagra Dosage Cheap Viagra From Usa Viagra Online Fast Buy Amoxicillin Without Px Amoxicillin Metro How To Buy Zoloft Viagra Niederlande Apotheke Grand Buy Levitra 20mg Buy Cephalexin In Uk Acheter Lioresal Ligne Buy Clomiphene Online Viagra For Aldre Buy Amoxicillin Without Prescriptions Best Zoloft Online Cialis 5 Precio Remeron Buy Online Cytotec Provera Get Low Price Calculate Your Repayments Motorbike Finance If you have bad credit and looking for a car loan Savvy Finance can help. Buy Backs Giving you the right to buy back your items from us within days Media and Press We appreciate that things sometimes happen that adversely affect your credit things that might have been out of your control.Flipkart NEFT RTGS IMPS Explore Investor Relations ICICI Bank Answers Credit Card Safe Banking Demat Step. bad credit loan Sierra Bible Camp PO Box Seneca Road Canyondam CA camp pay phone Caretaker Connie Glass Clint Evans Board President.LightStream Loans SunTrust SunTrust Mortgage SunTrust PortfolioView SunTrust Robinson Humphrey SunTrust Premier Program AMC Pinnacle AMC Premier Access Signature Advantage Brokerage Custom Choice Loan and SunTrust SummitView are federally registered service marks of SunTrust Banks Inc.Propecia Zona Temporale Purchase Kamagra Propecia Es Lo Mismo Que Proscar How To Buy Viagra Prescription Need To Order Cialis Cheap Alternative To Effexor Prednisolone Buying Outside Us Buy Generic Strattera Online Cialis 5 Mg Prix What'S Better Penicillin Or Amoxicillin cialis Osu Levitra Pharmacie Buy Isotretinoin Buy Zoloft Propecia Medicamentos Kamagra En Ligne Limoges Priligy Amoxicillin Dreams Amoxil Dosing For Sinus Infection Cheap Generic Viagra Viagra Acquisto Senza Ricetta Keflex Uti Zoloft Fast Delivery Mary'S Pharmacy Algodones Mexico Zithromax Side Effects Buy Vardenafil 10mg Pneumonia Zithromax Buy Doxycycline Nz Clomiphene Online Beta Lactam Amoxicillin Side Effects Sertraline Clomid Online Stores discount worldwide fedex shipping isotretinoin pills Acquista Viagra Italiano Accutane Canada Generique Priligy Safe Viagrasuperactivestore Prozac Prices Online Pharmacy Reviews Isotretinoin tab internet pharmacy with free shipping Online Zithromax Cephalexin Expiration Tarif Cialis Order Xenical Online Purchase Amoxicilina Cod Accepted Ups Buy Diflucan Uk Prozac Online Where I Can Buy Fast Flagyl And Fedex Finpecia Fast Delivery Overnight Buy Azithromycin Online Acheter Cialis Pharmacie

Marisa (not verified) - Sun, 04/09/2017 - 11:30

Attractive portion of content. I just stumbled upon your website and in accession capital to claim that I acquire actually
enjoyed account your weblog posts. Any way I'll be subscribing
in your augment and even I fulfillment you get entry to persistently fast.

Here is my homepage manicure

Vince (not verified) - Thu, 08/10/2017 - 09:55

Nice post. I learn something new and challenging on sites I stumbleupon everyday.

It will always be helpful to read articles from other writers and practice a little something from other websites.

my site; foot pain causes (http://duffyaxzxqaadpf.jimdo.com)

Grady (not verified) - Sat, 04/29/2017 - 15:43

Hello my family member! I wish to say that this article is awesome, great written and come with approximately all important infos.

I would like to look more posts like this.

Here is my blog post red high heels [http://margheritaansel.hatenablog.com/entries/2015/07/05]

Trina (not verified) - Wed, 05/10/2017 - 16:46

Hi there, the whole thing is going nicely here and ofcourse every one is sharing facts, that's actually excellent, keep up writing.

My web page; fuck it, http://racialpenitenti1.exteen.com,

Florence (not verified) - Sun, 05/28/2017 - 21:54

Incredible story there. What happened after? Thanks!

Also visit my website - foot pain in the arch

Alberto (not verified) - Fri, 06/09/2017 - 21:40

Right here is the perfect web site for everyone who wants to
find out about this topic. You know a whole lot its
almost tough to argue with you (not that I actually would want to?HaHa).

You certainly put a brand new spin on a topic which
has been discussed best shoes for bunions (Prince) decades.
Great stuff, just great!

Claude (not verified) - Mon, 05/29/2017 - 00:53

Sweet blog! I found it while surfing around on Yahoo News.

Do you have any suggestions on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Appreciate it

My web-site ... foot pain

Poppy (not verified) - Sun, 06/04/2017 - 13:10

Hello, Neat post. There is a problem with your site in web
explorer, could check this? IE still is the marketplace leader and a huge element
of other people will pass over your wonderful writing because of this problem.

Feel free to visit my weblog foot pain after surgery

Thelma (not verified) - Fri, 06/09/2017 - 21:13

Glad to be one of the visitors on this amazing web site :
D.

Also visit my homepage - foot pain bottom

Graciela (not verified) - Thu, 05/11/2017 - 00:45

Glad to be one of the visitors on this awesome web site :D.

my website :: lose weight quick, reconditeaccoun38.tumblr.com,

Oliva (not verified) - Thu, 05/11/2017 - 01:31

You can definitely see your expertise in the paintings you write.

The world hopes for more passionate writers such as you who are
not afraid to say how they believe. All the time follow your heart.

my webpage ... foot corn (heelscorinne.sosblogs.com)

Tam (not verified) - Thu, 05/11/2017 - 03:22

These are genuinely wonderful ideas pain in the toe (Rena) concerning
blogging. You have touched some nice factors here.

Any way keep up wrinting.

Verla (not verified) - Fri, 05/12/2017 - 02:42

Loving the information on this website, you have done outstanding
job on the blog posts.

Feel free to surf to my page best wide shoes for women (Jana)

Daryl (not verified) - Thu, 05/11/2017 - 13:48

Thanks for finally talking about > Add new comment | Mynet.su < Loved it!

My web page - hammer toe surgeries (juliblecker.weebly.com)

Francesco (not verified) - Thu, 05/11/2017 - 19:26

I leave a comment when I especially enjoy a post on a site or I
have something to contribute to the conversation. It is triggered by the sincerness
communicated in the article I read. And after this post Add new comment |
Mynet.su. I was excited enough to drop a leave a responsea response :) I actually do have some
questions for you if it's allright. Could it be simply me or
do some of the remarks look like coming from brain dead folks?
:-P And, if you are posting on additional online social sites, I'd
like to keep up with everything fresh you have to post.

Could you make a list every one of all your public pages like your Facebook
page, twitter feed, or linkedin profile?

Review my web-site tiny meals daily (imelda8sullivan8.jimdo.com)

France (not verified) - Thu, 05/11/2017 - 20:43

You can certainly see your expertise within the paintings you write.
The arena hopes for more passionate writers such as you who aren't afraid
to mention how they believe. Always follow your heart.

My homepage: crooked toes (http://whiteheadiwvuhdwclj.snack.ws/)

Refugia (not verified) - Sat, 06/03/2017 - 23:00

Hi there, You've done an incredible job. I will
certainly digg it and in my view suggest to my friends.
I'm confident they will be benefited from this site.

Here is my website :: foot pain at night

Ali (not verified) - Thu, 06/22/2017 - 01:48

Hi my family member! I wish to say that this article is
awesome, great written foot pain and swelling come
with almost all important infos. I would like to look extra posts like this.

Stormy (not verified) - Thu, 05/11/2017 - 02:28

Thanks for finally writing about > Add new comment | Mynet.su < Loved it!

my web site; foot discomfort (Rogelio)

Rhonda (not verified) - Fri, 05/12/2017 - 05:50

Loving the information on this internet site, you have done outstanding job on the
posts.

My webpage; allow kids (Florian)

Curtis (not verified) - Thu, 08/10/2017 - 10:46

My relatives all the time say that I am wasting my time here at net, except I know I am getting know-how daily by reading such nice articles.

my web site; vitamin d overdose foot pain (shelley4bennett75.wordpress.com)

Janet (not verified) - Thu, 08/10/2017 - 01:52

Right away I am ready to do my breakfast, later than having my breakfast coming again to read more news.

Also visit my web page ... foot pain gabapentin (http://monabelling.weebly.com/)

Ryan (not verified) - Wed, 08/23/2017 - 10:40

Pretty nice post. I just stumbled upon your weblog and wanted to say that I have truly enjoyed surfing around your blog posts.

In any case I'll be subscribing to your rss feed and I hope you write again soon!

My blog post :: What causes painful Achilles tendon?

Ardis (not verified) - Thu, 05/11/2017 - 21:34

Howdy very nice website!! Man .. Beautiful .. Amazing
.. I'll bookmark your web site and take the feeds additionally?
I am glad to search out so many helpful info here within the put up, we'd like
work out more techniques on this regard,
thank you for sharing. . . . . .

my webpage :: hammertoe solution (lurlenehogarth.jimdo.com)

Zelma (not verified) - Mon, 05/29/2017 - 06:04

Hello i am kavin, its my first occasion to commenting anyplace, when i read
this post i thought i could also create comment due to this brilliant piece of
writing.

Stop by my page :: foot pain and tingling

Janet (not verified) - Sun, 05/28/2017 - 20:27

This is the perfect web site for everyone who would like to understand this topic.
You understand a whole lot its almost hard to argue with you (not that I actually
would want to?HaHa). You definitely put a brand new spin on a topic which has been discussed for decades.
Great stuff, just great!

My site ... foot pain arch

Ulrich (not verified) - Sun, 05/28/2017 - 23:43

Incredible story there. What happened after? Take care!

My web site; foot pain on top of foot

Billy (not verified) - Mon, 05/29/2017 - 04:59

I create a comment whenever I appreciate a article on a site
or I have something to valuable to contribute to the
discussion. Usually it's triggered by the passion communicated in the article I read.
And on this article Add new comment | Mynet.su.

I was excited enough to create a thought ;) I do
have 2 questions for you if you don't mind.
Is it simply me or do a few of the comments look like coming from
brain dead individuals? :-P And, if you are writing
foot pain at night other
online sites, I would like to follow you. Would you make
a list all of all your social sites like your twitter feed, Facebook page or
linkedin profile?

Devin (not verified) - Wed, 06/07/2017 - 20:47

Hello i am kavin, its my first occasion to commenting anywhere, when i read
this post i thought i could also make comment due to this brilliant article.

Feel free to visit my web-site ... foot pain at night

Nellie (not verified) - Thu, 08/10/2017 - 08:03

What's up, just wanted to tell you, I enjoyed this article.

It was funny. Keep on posting!

Here is my site :: foot pain arch [http://fasthairstyle8694.exteen.com]

Julie (not verified) - Fri, 08/11/2017 - 13:17

Hey there! I simply would like to offer you a huge thumbs up for the great information you've got right here on this post.

I'll be coming back to your web site for more soon.

Have a look at my blog post; foot pain exercises (geraldbohmer.wordpress.com)

Connie (not verified) - Thu, 05/11/2017 - 04:14

For the reason that the admin of this web page is working, no uncertainty very shortly it will be well-known,
due to its quality contents.

Here is my page eliminate uric, http://katygomoran.hatenablog.com,

Clarence (not verified) - Thu, 05/11/2017 - 05:59

We are a gaggle of volunteers and starting a brand new scheme in our community.
Your website provided us with valuable info to work on.
You've done a formidable process and our entire
neighborhood might be thankful to you.

my weblog: carp nevertheless (http://thebestshoelifts.jigsy.com/tags/entries/heel-lift)

Regan (not verified) - Thu, 05/11/2017 - 08:21

My brother suggested I might like this web site.
He was once totally right. This publish truly made my
day. You can not believe simply how a lot time I had spent for this information! Thanks!

my webpage - hammertoe pain, http://carolynebottone.bravesites.com,

Marcela (not verified) - Mon, 05/29/2017 - 01:49

Just what I was searching for, thank you for posting.

Look at my web-site :: foot pain icd 10

Charmain (not verified) - Thu, 06/01/2017 - 17:43

For the reason that the admin of this website is working, no uncertainty very
rapidly it will be well-known, due to its quality contents.

Here is my blog post; foot pain and tingling

Prince (not verified) - Fri, 06/02/2017 - 00:42

Thanks for finally writing about > Add new comment | Mynet.su < Loved it!

my web-site ... foot pain on top of
foot

Andreas (not verified) - Thu, 08/10/2017 - 12:38

Wow! After all I got a web site from where I be able to

actually get useful data regarding my study

foot pain and tingling - chloegianelli.weebly.com - knowledge.

Ferdinand (not verified) - Wed, 08/23/2017 - 11:57

Good post. I learn something totally new and challenging on sites I

stumbleupon everyday. It will always be useful to read content from other

writers and practice something from other sites.

My webpage; Can you grow taller with exercise?

Hester (not verified) - Thu, 05/11/2017 - 09:48

For the reason that the admin of this web page is
working, no hesitation very shortly it will be renowned, due
to its quality contents.

Also visit my page ... weight reduction actions (leonsnapp.wordpress.com)

Randi (not verified) - Thu, 05/11/2017 - 10:14

Hi i am kavin, its my first occasion to commenting anyplace, when i read this piece of writing i thought i could
also make comment due to this brilliant paragraph.

my page; high functioning autism - Mikayla -

Vicki (not verified) - Sun, 05/28/2017 - 22:46

Just what I was searching for, regards for posting.

Also visit my weblog: foot pain after pregnancy

Florentina (not verified) - Thu, 05/11/2017 - 11:41

Right here is the right webpage for anybody who wishes to
understand this topic. You understand so much its almost tough to argue with you (not that I personally will need to?HaHa).
You certainly put a new spin on a subject that's been written about for a long time.

Excellent stuff, just excellent!

Here is my page; problems caused (boundlessyacht367.jigsy.com)

Christine (not verified) - Thu, 05/11/2017 - 23:50

Hiya very cool website!! Man .. Excellent .. Superb ..
I will bookmark your blog and take the feeds additionally?
I am glad to seek out so many helpful info here within the
put up, we want develop more techniques on this regard, thanks for sharing.
. . . . .

Also visit my web site diabetes diet [edythcrolley.jimdo.com]

Valencia (not verified) - Fri, 05/12/2017 - 00:52

Hello i am kavin, its my first occasion to commenting anywhere, when i read this paragraph i thought i could also create comment due to this sensible paragraph.

Here is my website ... cause pain; jessie5dean12.jimdo.com,

Jung (not verified) - Sat, 06/10/2017 - 05:58

First off I want to say awesome blog! I had a quick question in which I'd like to ask
if you do not mind. I was curious to find out how you center yourself and clear your thoughts before writing.
I've had difficulty clearing my mind in getting my ideas out.
I do take pleasure in writing however it just seems like the first 10 to 15 minutes tend to be wasted
simply just trying to figure out how to begin. Any suggestions or tips?
Kudos!

my web blog gout treatment (Alberta)

Pages