background preloader

Git

Facebook Twitter

Git tutorial. Git is a distributed revision control and source code management system with an emphasis on speed.

Git tutorial

Git was initially designed and developed by Linus Torvalds for Linux kernel development. Git is free software distributed under the terms of the GNU General Public License version 2. This tutorial will teach you how to use Git in your day-2-day life for project version control in a distributed environment while working on web based and non web based applications development. This tutorial has been prepared for the beginners to help them understand basic functionality of Git version control system. After completing this tutorial, you will find yourself at a moderate level of expertise in using Git version control system from where you can take yourself to next levels. Version control - Git for beginners: The definitive practical guide. Guida visuale a Git. Se riscontri problemi di visualizzazione delle immagini, prova la versione Non-SVG di questa pagina.

Guida visuale a Git

Immagini SVG disabilitate. (Riattiva SVG) Questa pagina offre una breve guida visuale per i comandi più comuni di Git. Una volta comprese le basi di Git, questo sito potrà aiutarti a fissare questi concetti. Se ti interessa conoscere come è stato creato questo sito visita il mio repository GitHub. Contenuti Utilizzo di Base I quattro comandi precedenti copiano i file tra la working directory, lo stage (chiamato anche index) e l'history (rapprestentata dai commit). git add file copia i file (nel loro stato corrente) nello stage. git commit crea uno snapshot dello stage sotto forma di commit. git reset -- file rimuove i file dallo stage; ovvero copia i file dell'ultimo commit nello stage.

Puoi usare git reset -p, git checkout -p, oppure git add -p al posto di (o in aggiunta di) specificare i file specifici, per determinare in modo interattivo, che blocchi copiare. Convenzioni Comandi nei Dettagli. Inspecting a repository. Git status The git status command displays the state of the working directory and the staging area.

Inspecting a repository

It lets you see which changes have been staged, which haven’t, and which files aren’t being tracked by Git. Status output does not show you any information regarding the committed project history. For this, you need to use git log. Usage git status List which files are staged, unstaged, and untracked. Discussion The git status command is a relatively straightforward command. . # On branch master # Changes to be committed: # (use "git reset HEAD <file>...

" to unstage) # #modified: hello.py # # Changes not staged for commit: # (use "git add <file>... " to update what will be committed) # (use "git checkout -- <file>... " to discard changes in working directory) # #modified: main.py # # Untracked files: # (use "git add <file>...

" to include in what will be committed) # #hello.pyc Ignoring Files Untracked files typically fall into two categories. . *.pyc Example. Git Workflow for Beginners. You’ve used Git and Github a little bit but you’re not comfortable yet with how to use it.

Git Workflow for Beginners

In this post I’ll go through a basic work flow for tracking a project with Git and posting to Github. If you’re reading this post you’ve worked at least once with Git and Github and are still new to working with the Terminal and want to get better. If this is the first thing you’ve ever read about Git, I suggest starting with my Introduction to Git & the Command Line post. A post about using branches and working with others through Github is coming soon.

When Do I Do What? Working with the command line is an acquired sense of comfort. The commands we are concerned about fall in to four categories: Do once per project. These aren’t really strict categories, merely one way to mentally organize the steps and commands involved to use Git from the command line. On beginning a new project. SK Introduction to Git & the Command Line (with a splash of Github) This tutorial will teach you the basics of using Git and Github and is based on a workshop given on September 12th and 13th at ITP.

SK Introduction to Git & the Command Line (with a splash of Github)

If you've already set up Git on your computer and are not sure what to do next check out my Git Workflow for Beginners and if you're looking for more advanced tools and tricks, check out these links. Audience This tutorial is intended for someone who has had at least a little exposure to programming and none to the command line.

GitHub for Cats. Introduction: If you're a cat, you probably haven't heard of GitHub.

GitHub for Cats

Maybe your human companion has, but they don't really know how to explain it to you. (Which, as a cat, is extremely frustrating.) GitHub is a website that allows content creators, whether it be via programming, blogging, or issue-reporting, to collaborate together and to learn from each other. It's powered by a "distributed version control system" called git. Getting Up and Running: You may stay laying down though, as you are a cat. The best way to get started with GitHub is to create a GitHub account! That was easy. Getting Social: Before you tackle the code-y parts of GitHub, a great way to start is to find others' code.

The Lay of the Land: GitHub is split into a lot of pages. You'll notice a lot at first. An issue: The first thing I will do is create an issue. As you can see, I've filled out an issue. Another thing I want to do for him is make him a README. Forks For Cats: My own fork (or copy) of Super Cat's repo! DIY Guides - Open Sourcerer.