zsh-users
 help / color / mirror / code / Atom feed
* Re: git along
  2014-11-13 19:09 git along Ray Andrews
@ 2014-11-13 18:44 ` Nathan Schwarz
  2014-11-13 23:48   ` Ray Andrews
  2014-11-13 19:20 ` Bart Schaefer
  2014-11-13 20:01 ` Peter Stephenson
  2 siblings, 1 reply; 6+ messages in thread
From: Nathan Schwarz @ 2014-11-13 18:44 UTC (permalink / raw)
  To: zsh-users

Use `git -C $dir $command` to change the directory before executing the
command. If you run `git clone $source $dest` a second time it will tell
you that the directory $dest is not empty and abort.

To start with git the first chapters of the git-book[1] are good. I'd
recommend to read at least the three first chapters for the beginning.
The rest is also very well written.

1: http://git-scm.com/book/en/v2

-Nathan

-- 
/"\  ASCII Ribbon Campaign
\ /  - against HTML emails
 X   - against proprietory attachments
/ \  http://en.wikipedia.org/wiki/ASCII_Ribbon_Campaign


^ permalink raw reply	[flat|nested] 6+ messages in thread

* git along
@ 2014-11-13 19:09 Ray Andrews
  2014-11-13 18:44 ` Nathan Schwarz
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ray Andrews @ 2014-11-13 19:09 UTC (permalink / raw)
  To: Zsh Users

Gentlemen,

The 'git' manual being longer than War and Peace, let me ask
some simple questions:

       git clone git:where-its-coming-from where-its-going-to

... simple. If I rerun it with the same target dir, will it just
update, or will it do the full monty all over again? Would any
files I've added be preserved, or nuked?

Or do we:

     git update ...

Can we:

     git just-show-me-whats-changed ... ?

... or is life just not meant to be so painless?

Is there a recommended beginner's guide to git?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git along
  2014-11-13 19:09 git along Ray Andrews
  2014-11-13 18:44 ` Nathan Schwarz
@ 2014-11-13 19:20 ` Bart Schaefer
  2014-11-13 20:01 ` Peter Stephenson
  2 siblings, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 2014-11-13 19:20 UTC (permalink / raw)
  To: Ray Andrews, Zsh Users

This is really more suitable for zsh-workers, but to keep the thread in
one place:

On Nov 13, 11:09am, Ray Andrews wrote:
}
} The 'git' manual being longer than War and Peace, let me ask
} some simple questions:

There's a section on "Use of Git" in Etc/zsh-development-guide which has
pointers to additional help.

}        git clone git:where-its-coming-from where-its-going-to
} 
} ... simple. If I rerun it with the same target dir, will it just
} update, or will it do the full monty all over again?

You don't want to clone again.  Use "git pull".

} Would any files I've added be preserved, or nuked?

I don't believe git will ever nuke something that's not under its control,
but I've never done a clone on top of a clone.

} Can we:
} 
}      git just-show-me-whats-changed ... ?

git status  -- to see what files are (not) under git control

git diff  --  to see what *you* changed but did not yet commit

git whatchanged  -- to see change history of your current source tree

git whatchanged origin/master  -- for changes you may not have "pull"ed



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git along
  2014-11-13 19:09 git along Ray Andrews
  2014-11-13 18:44 ` Nathan Schwarz
  2014-11-13 19:20 ` Bart Schaefer
@ 2014-11-13 20:01 ` Peter Stephenson
  2014-11-14 17:31   ` Bernd Steinhauser
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2014-11-13 20:01 UTC (permalink / raw)
  To: Zsh Users

On Thu, 13 Nov 2014 11:09:05 -0800
Ray Andrews <rayandrews@eastlink.ca> wrote:
> The 'git' manual being longer than War and Peace, let me ask
> some simple questions:
> 
>        git clone git:where-its-coming-from where-its-going-to
> 
> ... simple. If I rerun it with the same target dir, will it just
> update, or will it do the full monty all over again? Would any
> files I've added be preserved, or nuked?

Just change into where-its-going-to and

git pull

or if you're liable to have made changes to the repository yourself since you last updated

git pull --rebase

which puts your changes together with the remote ones together in a neater
fashion.

> Can we:
> 
>      git just-show-me-whats-changed ... ?
> 
> ... or is life just not meant to be so painless?

Do you mean what you just imported in the last pull?

git log ORIG_HEAD..

Add the option -p if you want to see changes within files as a patch.

(As you're about to see, any sufficiently complicated git post
instantly has half a dozen git experts falling over themselves to point
out the error of your ways.)

> Is there a recommended beginner's guide to git?

http://git-scm.com/book/en/v2

pws
 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git along
  2014-11-13 18:44 ` Nathan Schwarz
@ 2014-11-13 23:48   ` Ray Andrews
  0 siblings, 0 replies; 6+ messages in thread
From: Ray Andrews @ 2014-11-13 23:48 UTC (permalink / raw)
  To: zsh-users

  Thanks all for help with 'git'. Some nice docs there. Got a whole new 
set of words to
learn.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git along
  2014-11-13 20:01 ` Peter Stephenson
@ 2014-11-14 17:31   ` Bernd Steinhauser
  0 siblings, 0 replies; 6+ messages in thread
From: Bernd Steinhauser @ 2014-11-14 17:31 UTC (permalink / raw)
  To: zsh-users

On 13/11/14 21:01, Peter Stephenson wrote:
>> Can we:
>>
>>       git just-show-me-whats-changed ... ?
>>
>> ... or is life just not meant to be so painless?
> Do you mean what you just imported in the last pull?
>
> git log ORIG_HEAD..
>
> Add the option -p if you want to see changes within files as a patch.
>
I'd recommend using tig [1] for this, which is very nice for digging through git 
logs. I guess that just about every distro has it.

[1] http://jonas.nitro.dk/tig/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-14 17:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13 19:09 git along Ray Andrews
2014-11-13 18:44 ` Nathan Schwarz
2014-11-13 23:48   ` Ray Andrews
2014-11-13 19:20 ` Bart Schaefer
2014-11-13 20:01 ` Peter Stephenson
2014-11-14 17:31   ` Bernd Steinhauser

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).