Re: Considering teaching plumbing to users harmful

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitry Potapov
Date: Thursday, July 17, 2008 - 5:38 am

On Thu, Jul 17, 2008 at 11:30 AM, "Peter Valdemar Mørch (Lists)"
<4ux6as402@sneakemail.com> wrote:

There are a few other commands that are considered as porcelain, but they
are not so often used or used for very specific purposes, such sending
patches by email. So, you do not have to bother about them right now.
In fact, even this list may be too long to be learned at once. It is
better to proceed step-wise, like this:

=== Getting started ===
1. Creating your repo
git init
git clone

2. Commiting your changes
git add
git commit

There are also git mv, git rm for those who need them.

3. Inspect your changes before committing them
git status
git diff

4. Inspecting history
git log

5. Synchronization with the upstream
git pull
git push

=== More commands ===

6. How to revert my changes?
6.1. reverting uncommitted changes
git checkout file
git checkout HEAD file
6.2. committed but not publish changes
git reset HEAD^
git reset --hard HEAD^
6.3. published changes
git revert

7. Who introduced this change?
git log -S as better alternative to git blame

8. Some useful "tricks"
git grep
git add -p
git diff --cached
git commit --amend
git show
git log -p

=== Working with branches ===

9. Creating branches and tags
git tag
git branch
git checkout

10. Merging is easy
git merge
By the way:
git pull = git fetch + git merge FETCH_HEAD
git merge branch = git pull . branch

11. What is rebase?
When can it be useful?
Advantages and disadvantages.

=== More "advanced" commands ===

12. git safety net
git log -g

13. Find the change that introduced a bug
git bisect

14. Short review other commands:
git gc
git archive
git-cherry-pick
git remote
git format-patch
git apply
git am

===


I agree, it is very confusing for beginners. The rule of the thumb that
helped me when I started was that commands with dash in their names are
plumbing (there are a few exceptions though).

Dmitry
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 10:21 am)
Re: Considering teaching plumbing to users harmful, Jesper Eskilson, (Wed Jul 16, 10:50 am)
Re: Considering teaching plumbing to users harmful, Avery Pennarun, (Wed Jul 16, 10:53 am)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 11:12 am)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 11:14 am)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Wed Jul 16, 11:18 am)
Re: Considering teaching plumbing to users harmful, Jesper Eskilson, (Wed Jul 16, 11:19 am)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 11:27 am)
Re: Considering teaching plumbing to users harmful, Avery Pennarun, (Wed Jul 16, 11:35 am)
Re: Considering teaching plumbing to users harmful, Avery Pennarun, (Wed Jul 16, 11:51 am)
Re: Considering teaching plumbing to users harmful, Petr Baudis, (Wed Jul 16, 11:59 am)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Wed Jul 16, 12:09 pm)
Re: Considering teaching plumbing to users harmful, Avery Pennarun, (Wed Jul 16, 12:22 pm)
Re: Considering teaching plumbing to users harmful, Avery Pennarun, (Wed Jul 16, 12:29 pm)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Wed Jul 16, 12:34 pm)
Re: Considering teaching plumbing to users harmful, Avery Pennarun, (Wed Jul 16, 12:46 pm)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Wed Jul 16, 1:12 pm)
Re: Considering teaching plumbing to users harmful, Theodore Tso, (Wed Jul 16, 1:13 pm)
Re: Considering teaching plumbing to users harmful, Stephen R. van den Berg, (Wed Jul 16, 1:23 pm)
Re: Considering teaching plumbing to users harmful, Nicolas Pitre, (Wed Jul 16, 1:27 pm)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Wed Jul 16, 1:51 pm)
Re: Considering teaching plumbing to users harmful, Dmitry Potapov, (Wed Jul 16, 2:48 pm)
Re: Considering teaching plumbing to users harmful, Daniel Barkalow, (Wed Jul 16, 2:53 pm)
Re: Considering teaching plumbing to users harmful, Dmitry Potapov, (Wed Jul 16, 2:59 pm)
Re: Considering teaching plumbing to users harmful, Stephan Beyer, (Wed Jul 16, 3:09 pm)
Re: Considering teaching plumbing to users harmful, Dmitry Potapov, (Wed Jul 16, 3:24 pm)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 3:28 pm)
Re: Considering teaching plumbing to users harmful, Theodore Tso, (Wed Jul 16, 3:32 pm)
Re: Considering teaching plumbing to users harmful, Theodore Tso, (Wed Jul 16, 3:49 pm)
Re: Considering teaching plumbing to users harmful, Sean Kelley, (Wed Jul 16, 3:53 pm)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 4:05 pm)
Re: Considering teaching plumbing to users harmful, Nigel Magnay, (Wed Jul 16, 4:17 pm)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 4:19 pm)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 4:22 pm)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Wed Jul 16, 4:40 pm)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 5:02 pm)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Wed Jul 16, 5:25 pm)
Re: Considering teaching plumbing to users harmful, Stephan Beyer, (Wed Jul 16, 6:01 pm)
Re: Considering teaching plumbing to users harmful, Theodore Tso, (Wed Jul 16, 7:47 pm)
Re: Considering teaching plumbing to users harmful, Stephen Sinclair, (Wed Jul 16, 8:21 pm)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Wed Jul 16, 11:53 pm)
Re: Considering teaching plumbing to users harmful, "Peter Valdemar Mørc ..., (Thu Jul 17, 12:30 am)
Re: Considering teaching plumbing to users harmful, Dmitry Potapov, (Thu Jul 17, 5:38 am)
Re: Considering teaching plumbing to users harmful, Theodore Tso, (Thu Jul 17, 5:55 am)
Re: Considering teaching plumbing to users harmful, Peter Valdemar Mørch, (Thu Jul 17, 6:35 am)
RE: Considering teaching plumbing to users harmful, Craig L. Ching, (Thu Jul 17, 7:21 am)
Re: Considering teaching plumbing to users harmful, Theodore Tso, (Thu Jul 17, 7:26 am)
Re: Considering teaching plumbing to users harmful, Petr Baudis, (Thu Jul 17, 7:51 am)
Re: Considering teaching plumbing to users harmful, J. Bruce Fields, (Thu Jul 17, 8:55 am)
Re: Considering teaching plumbing to users harmful, J. Bruce Fields, (Thu Jul 17, 8:57 am)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Thu Jul 17, 9:38 am)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Thu Jul 17, 11:16 am)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Thu Jul 17, 11:29 am)
Re: Considering teaching plumbing to users harmful, Johannes Schindelin, (Thu Jul 17, 11:43 am)
Re: Considering teaching plumbing to users harmful, Junio C Hamano, (Thu Jul 17, 12:10 pm)
Re: Considering teaching plumbing to users harmful, Andreas Ericsson, (Fri Jul 18, 1:19 am)
Re: Considering teaching plumbing to users harmful, J. Bruce Fields, (Fri Jul 18, 7:35 am)
Re: Considering teaching plumbing to users harmful, Ping Yin, (Fri Jul 18, 10:02 am)
Re: Considering teaching plumbing to users harmful, Jeff King, (Fri Jul 18, 11:26 am)
Re: Suggestion: doc restructuring, Junio C Hamano, (Fri Jul 18, 12:50 pm)
Re: Addremove equivalent [was: Re: Considering teaching pl ..., Johannes Schindelin, (Fri Jul 18, 4:03 pm)
Re: Suggestion: doc restructuring [was: Re: Considering te ..., Johannes Schindelin, (Fri Jul 18, 6:19 pm)
Re: Addremove equivalent, Junio C Hamano, (Sat Jul 19, 8:27 pm)
[PATCH 2/2] git-add -a: add all files, Junio C Hamano, (Sat Jul 19, 8:29 pm)
[PATCH 3/2] git-add -a: tests, Junio C Hamano, (Sat Jul 19, 8:32 pm)
Re: [PATCH 2/2] git-add -a: add all files, Tarmigan, (Sat Jul 19, 9:20 pm)
Re: [PATCH 2/2] git-add -a: add all files, Tarmigan, (Sat Jul 19, 9:28 pm)
Re: Suggestion: doc restructuring, Junio C Hamano, (Sun Jul 20, 1:14 am)
Re: [PATCH 2/2] git-add -a: add all files, Johannes Schindelin, (Sun Jul 20, 3:56 am)
Re: Suggestion: doc restructuring, Johannes Schindelin, (Sun Jul 20, 4:02 am)
Re: [PATCH 2/2] git-add -a: add all files, Jay Soffian, (Sun Jul 20, 5:45 am)
Re: [PATCH 2/2] git-add -a: add all files, Sverre Rabbelier, (Sun Jul 20, 1:34 pm)
Re: Suggestion: doc restructuring, Andreas Ericsson, (Sun Jul 20, 11:41 pm)
Re: Suggestion: doc restructuring, Johannes Schindelin, (Mon Jul 21, 3:04 am)
Re: Suggestion: doc restructuring, Junio C Hamano, (Mon Jul 21, 9:22 am)