theshell.ch/site/pages/cmd/interm/git.html
bevilj a6515acdb9 order pages for navigation
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@254 a672b425-5310-4d7a-af5c-997e18724b81
2018-11-18 20:38:56 +00:00

52 lines
1.7 KiB
HTML

---
layout: page
category-page: intermediate
category-title: Intermediate commands
tags: versioning commit merge software source code
author: Andrea Brites Marto
title: git
previous-page: pages/cmd/interm/fg.html
next-page: pages/cmd/interm/ifconfig.html
---
If you want to use <i>Git</i> on the shell you need to know how this command works.<br>
The <i>git</i> command providesa set of high-level operations and full access to internals.<br>
Here is the basic syntax but commands may become some more complicated:
<pre>
git [flags] [path]
</pre>
<h3>Start a working environment</h3>
<ul>
<li><b>clone</b>: is used to clone a repository in a new directory.</li>
<li><b>init</b>: this onw is used to create an empty Git repository or reinitialize
an existing one.
</li>
</ul>
<h3>Work on the current changes</h3>
<ul>
<li><b>add</b>: add a file contents to the index.</li>
<li><b>mv</b>: move or renamea file, directory or a symlink (a symbolic link).</li>
<li><b>rm</b>: remove files from the working tree and from the index.</li>
<li><b>format-patch id</b>: create a file patch</li>
<li><b>am</b>: apply a patch file</li>
</ul>
<h3>History and state</h3>
<ul>
<li><b>log</b>: show commit logs.</li>
<li><b>status</b>: show the working tree status.</li>
</ul>
<h3>Managing modification</h3>
<ul>
<li><b>commit</b>: record changes to the repository.</li>
<li><b>diff</b>: show changes between commits.</li>
<li><b>merge</b>: merge two or more development histories together.</li>
<li><b>pull</b>: fetch from and update your local directory with the repository.</li>
<li><b>push</b>: update the remote repository with your changes.</li>
</ul>