Re: [git-users] Re: SVN vs GIT

2012-03-10 Thread Konstantin Khomoutov
On Fri, Mar 09, 2012 at 01:11:58PM -0800, Lars Pensjö wrote:

 In my opinion, SVN is easier to use and the tortoise client is superior. 
...superior compared to what exactly?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Freeze a branch

2012-03-11 Thread Konstantin Khomoutov
On Sun, 11 Mar 2012 06:19:26 -0700 (PDT)
Mark Liversedge liverse...@gmail.com wrote:

 I have a branch on github that was used for development for the last
 18 months, but it has now been merged back into master.
 
 I will be removing it shortly, but am keeping it just in case
 anything odd crops up, or folks have local versions they are working
 against and submit a patch in the next couple of weeks.
 
 But .. I don't want to use the branch, any pushes to github must go
 against master, since this branch will be deleted soon.
 
 is there a way of 'freezing' or 'hiding' a remote branch so no
 updates can be pushed (and ideally, it cannot be cloned either) ?
Just replace the branch with a tag (possibly annotated).
The trick is that tags point to lines of history, just like branches,
but they don't move.  There's no problem with using tags to refer to
history--be it `git diff`, `gitk` etc.

Assuming that branch to be freezed is called feaure, do something
like this:
$ git checkout master
$ git tag -a feature feature
...Write up a tag message explaining the freeze...
$ git branch -D feature
$ git push github :feature feature

The last command will first delete the branch feature
in the remote repository and then push the same named tag
there effectively replacing the branch with the tag.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] gsoc 2012 project

2012-03-21 Thread Konstantin Khomoutov
On Wed, 21 Mar 2012 09:14:48 -0700 (PDT)
Raman Gupta royalbird.ra...@gmail.com wrote:

[...]
 Idea for GSOC 2012:
  Actually I found all the ideas interesting to me at a glance but the
 ideas which interested be more are:-
[...]

This list is of no help for such questions--ask on main Git list
instead: http://vger.kernel.org/vger-lists.html#git

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] GIT: cloning from godaddy.

2012-03-25 Thread Konstantin Khomoutov
On Sun, Mar 25, 2012 at 05:12:57AM -0700, Whitehorse06 wrote:

[...]
 git clone -u  /var/chroot/home/content/85/91334343/git/Readme.txt
 myHostAlias
 Cloning into myHostAlias...
 /var/chroot/home/content/85/91334343/git/Readme.txt  '/home/rams/
 domain/git/test/myHostAlias': 1: /var/chroot/home/content/85/91334343/
 git/Readme.txt: not found
 fatal: The remote end hung up unexpectedly
 
 
 I am struck. What is causing the problem?

Git is not Subversion, it's a DVCS so you can't just fetch one single
file, instead, you have to *clone* (that's why it's called `git clone`
after all) the whole repository (but see below).  Consequently, you
have to use the path to a repository with `git clone`.

Technically, `git clone` can do what's called a shallow clone, that
is, it's able to fetch not the whole history but just the specified
number of commits from a given remote branch and all associated objects,
so you can kind of achieve what `svn checkout` can yield when run with
the URL of a root directory of a project.
But if you intend to do any serious work against a repository,
shallow cloning is not a recommended way to go, it's intended for cases
when you just want to fetch a source tree for the purpose of building it
or something like this.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Show first/original version of all files

2012-03-28 Thread Konstantin Khomoutov
On Wed, 28 Mar 2012 06:02:35 -0700 (PDT)
dspfun dsp...@hotmail.com wrote:

 I have made a clone of a git repo. Each file has a number of
 modifications to it compared to when the files were put into git.
 
 I would like to see all the original/first versions of each file,
 how do I do this in git?

$ git show rev:filename

Would dump the contents of filename as recorded in revision rev.

So you have to decide what revision you cound as original and then
run the above command for each file of interest.

See the gitrevisions manual page for more info about the syntax.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Show first/original version of all files

2012-03-28 Thread Konstantin Khomoutov
On Wed, 28 Mar 2012 06:02:35 -0700 (PDT)
dspfun dsp...@hotmail.com wrote:

 I have made a clone of a git repo. Each file has a number of
 modifications to it compared to when the files were put into git.
 
 I would like to see all the original/first versions of each file,
 how do I do this in git?

A followup: if you're really want to look at the original versions of
*all* files comprising the current state of a repository, then you just
want to do `git checkout`.

This might seem like posing a problem, but really it isn't:
1) If you do not have uncommitted changes, just go ahead and do
   `git checkout original_rev`--you will be able to to do
   `git checkout the_branch_I_was_on` any time later.
2) If you do have uncommitted changes then just commit them--
   later you'll be able to check out that branch back and then
   back it out by one commit, keeping the changes in the work
   tree by doing `git reset HEAD~1`.  Or run `git stash` to just
   stash away your uncommitted changes to a special place.
   Then after checking out your branch back you'll run
   `git stash pop` and bring your uncommitted changes back.

TL;DR:
`git show rev:path` is a tool for quick reviews of past revisions
while `git checkout rev` is a tool for comprehensive reviews of them.
The latter might require some extra work to deal with uncommitted
changes if there are any.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] specifying port numbers for git protocol

2012-03-28 Thread Konstantin Khomoutov
On Wed, Mar 28, 2012 at 05:48:05PM -0400, Tom Roche wrote:

[...]
 port 22 (ssh) is blocked by the firewall, but you should be able to
 go out on port 443.
 
 So I'm wondering, how to setup git users on the cluster so that
 git protocol will use port=443 automagically? Should this be done
 via git (e.g., using `git remote` or `git config`)? or via ssh
 (e.g., using ~/.ssh/config), or some other way?
github.com serves HTTPS on port 443, so while there's no problem
with specifying port when accessing the server via SSH
(just set the URL like ssh://u...@github.com:443/path/to/repo;
see the git-fetch manual page for more info) there's no point
in doing so: the server does not speak SSH on that port.

So if you're really about using github for your central server,
then either make all members of your team have that environment variable
set or find a way to make libcurl (which Git uses for HTTP[S] transfers)
not verify certs by tweaking some user's configuration file.

Another way would be to install an SSL tunnel on a box in what you
called the cluster which would listen on some port (say, 80) for plain
HTTP and tunnel that traffic to github.com:443.  I think that stunnel in
client mode of some reverse proxy (Apache with mod_proxy, probably nginx)
could do this.  You would then have your team communicate with that box
using plain HTTP and it would proxy the requests to the SSL-terminated
github server.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Git gone :(

2012-04-10 Thread Konstantin Khomoutov
On Tue, 10 Apr 2012 06:46:12 -0700 (PDT)
Paul Hollyer p...@hollyer.me.uk wrote:

  env $PATH
  to see what your path looks like.
[...]
 Thanks for the quick replies, here is the result of env $PATH:
  
 env: 
 /root/local/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/bin:/bin:/usr/
 sbin:/sbin:/usr/local/rvm/bin:/root/bin: No such file or directory
 
 I assumed re-installing git would make it add the required paths
 where necessary again if they had been broken.
Installing something by `make install` never touches the environment
(and for good).

 Can you help me fix this?
 
 Git is at /usr/local/src I think,
Very improbable.
Possibly you unrolled the Git source tarball there, but when you did
./configure
it probably picked /usr/local as its installation prefix,
so supposedly you do have main Git binary under /usr/local/bin, and
that's what you're supposed to add to your PATH.

 so how do I add this to the search path?
The answer is it depends.

The most correct approach (to me) is to find binary package(s) for Git
matching your OS (and its version), and install them.  This gives you
two benefits:
1) Git will be installed in a well-known place, where it will be
   accessible without messing with the user's environment.
2) You will have less problems when uninstalling or upgrading Git later,
   as this will be routinely carried out by the package manager.

If you insist on building Git from the source, there are two ways:
1) Run `./configure --help` and see what it needs to install Git into
   the standard hierarchy, that is, under /usr.
   Usually this is --prefix=/usr
2) Install as-is, but notice where the files are installed.
   Just run `make install /tmp/log` and inspect the generated log file
   to see where the files have been installed.

In the latter case you might have to fix the environment *of the user
under which account Git will run.*  This is important: from the output
you shown us, it follows that you run this command as root.  It's
highly unlikely you're pushing as root as well (if you're a sensible
person at least), and you have to tweak either the global environment
or the environment of the mentioned user.
How to do that depends on the shell which is spawned by SSH on the
server when you push.  Usually it's the same as the user's login shell
(the one used for interactive logins).
The config file to tweak depends on the shell.
For bash this will be
~/.bashrc
and you'll have to add to it something like
export PATH=$PATH:/usr/local/bin

 Sorry if it's a basic linux question, but am learning by doing, and
 fixing...

As you can see, you'll have to get a book on Unix and read it as the
question being discussed has little to do with Git.
You ccan also get help on relevant resources such as news groups
or http://stackoverflow.com

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Error / Aborting during a git checkout

2012-04-25 Thread Konstantin Khomoutov
On Wed, 25 Apr 2012 07:05:05 -0700 (PDT)
thomas.tre...@gmail.com thomas.tre...@gmail.com wrote:

 I've a problem with my Git server.
 On my local machine, I've a copy of two branch : master and
 test_branch.
 
 I work on the test_branch, and I've commit all modifications.
 However, when I try to switch on the master branch, TortoiseGit give
 me this error :
 
 Aborting
 git did not exit cleanly (exit code 1)
Start from running git checkout by hand, that is, fire up the console
window, `cd` to your project's directory and type

git checkout master

there.
See what it will print out.
In case it'll be needed, the exit code of the program can be obtained
by executing

echo %ERRORLEVEL%

after the program finished execution.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Forward-porting commits - merge or rebase?

2012-05-11 Thread Konstantin Khomoutov
On Fri, 11 May 2012 18:35:03 +0300
Nikos Chantziaras rea...@gmail.com wrote:

[...]
  The consequence is that if you push a branch containing commits
  ...-A-B-C
  (with C being the tip commit) to a public repo, then rebase these
  three commits to produce
  ...-A'-B'-C'
  and push it again (this would require a forced push), everyone who
  happened to fetch the original state of your branch and base their
  work on it (on the commit C, that is) will have pain in the neck
  when their next fetch from your repo will suddenly replace a series
  of tip commits on that branch.  Everyone will be required to rebase
  their work in turn, to follow your rebase.
 
 I don't want to push something that would require others to rebase.
 But from the Pro Git book, in the 3.6 Rebasing section, I had this
 in mind:
 
Do not rebase commits that you have pushed to a public repository.
If you follow that guideline, you’ll be fine.
 
 And indeed the commits I'm talking about have *not* been pushed to a 
 public repository; I just made those commits in master.  So my first 
 impression was that there would be no problem.  But it seems I didn't 
 understand what rebase really means.  I now understand that when
 the book says do not rebase pushed commits, it does not mean the
 commits I just made in master and want to rebase them to exp.  It
 means all the commits in exp.  Did I get that right now?
No, you got it right the first time, that is, your first impression
was correct. :-)

The idea with rebasing is that you can rebase any series of commits
(ending with the branch's tip commit) on top of technically any other
series of commit.  You do not have to rebase the whole branch.  To
rebase a branch is just a popular way to spell it, but it's not
technically perfect: you usually rebase just some series of commits
near the tip of a branch, and usually this series starts right after
the commit which is a common ancestor of both branches.  Of course,
there's very little sense to rebase a series of commits onto something
completely irrelevant and so the typical case for rebasing is like this:

You have a branch, say, master, which looks like this:
...-A-B-C
that is, it ends with commit C.

You fork another branch, exp, off of it. Initially it looks exactly
the same:
...-A-B-C

Now you put commit X, and Y on exp, so it now looks this way:
...-A-B-C-X-Y

In the meantime you committed M an N on master, so it looks like this:
...-A-B-C-M-N

And now you want to pretend that X and Y on exp were made relative to
the *current* tip of master, which is now N (as opposed to it being C
at the time exp was forked off of it).
Observe that C is what's called the common ancestor for both the
involved branches here.
So you rebase the series X-Y in exp onto master, and exp starts to
look like this:
...-A-B-C-M-N-X'-Y'
(And the common ancestor is now N.)

Here, we changed the base of the series X-Y to be N instead of C.

The problem with rebasing and a public repo would only appear here if
you would have managed to push exp into that public repo after
committing X or Y.  If the exp branch ends in C in the remote repo,
it's fine to rebase X-Y in your local version of exp.

 Btw, in case you're also using Mercurial, my workflow there is:
 
* make a commit in master
* hg export that commit
* switch to the exp branch
* hg import the commit
 
 This would be merge in Git rather than rebase, right?
Uh, I don't quite follow.
Merge commits in Git happen only when you run `git merge` or something
which ultimately calls `git merge` (`git pull` might do this for
instance).
From what I read in `hg import` manual, the closest thing in Git would
be `git format-patch` + `git am`.  Also `git cherry-pick` is able to
pick arbitrary commit (or a series of them) and apply it/them to the
current branch.
Rebasing in Git is used for a bit different need as I tried to
explain above.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Forward-porting commits - merge or rebase?

2012-05-11 Thread Konstantin Khomoutov
On Fri, May 11, 2012 at 09:50:18PM +0300, Nikos Chantziaras wrote:

[...]
 The idea with rebasing is that you can rebase any series of commits
 (ending with the branch's tip commit) on top of technically any other
 series of commit.  You do not have to rebase the whole branch.  To
 rebase a branch is just a popular way to spell it, but it's not
 technically perfect: you usually rebase just some series of commits
 near the tip of a branch, and usually this series starts right after
 the commit which is a common ancestor of both branches.  Of course,
 there's very little sense to rebase a series of commits onto something
 completely irrelevant and so the typical case for rebasing is like this:
 
 You have a branch, say, master, which looks like this:
 ...-A-B-C
 that is, it ends with commit C.
 
 You fork another branch, exp, off of it. Initially it looks exactly
 the same:
 ...-A-B-C
 
 Now you put commit X, and Y on exp, so it now looks this way:
 ...-A-B-C-X-Y
 
 In the meantime you committed M an N on master, so it looks like this:
 ...-A-B-C-M-N
 
 And now you want to pretend that X and Y on exp were made relative to
 the *current* tip of master, which is now N (as opposed to it being C
 at the time exp was forked off of it).
 Observe that C is what's called the common ancestor for both the
 involved branches here.
 So you rebase the series X-Y in exp onto master, and exp starts to
 look like this:
 ...-A-B-C-M-N-X'-Y'
 (And the common ancestor is now N.)
 
 This is why I'm confused now.  If I understood it right the first
 time, I am rebasing M and N.  But here you say that X and Y are
 getting rebased.
I fear this might be a point-of-view issue.
I tried to explain what happens when you rebase some commits present on
exp onto the new tip of master.  If you want to rebase some commits
on master onto the new tip of exp, just exchange branch names in the
above discussion.  Name them foo and bar after all.

Let's try to recap: rebasing, in essense, is changing the base (hence
why rebasing) of a series of commits (which end in the branch's tip).
If you're rebasing foo onto bar, you're changing the base of some
commits in foo to be the bar's tip, so that foo looks like bar with that
rebased series of commits applied onto its tip.

Technically, there are other cases for rebasing, but this one is the
simplest and most used (maybe with exception to squashing and fixups).

 The problem with rebasing and a public repo would only appear here if
 you would have managed to push exp into that public repo after
 committing X or Y.  If the exp branch ends in C in the remote repo,
 it's fine to rebase X-Y in your local version of exp.
 
 exp contains pushed commits and has diverged from master.  master
 also contains commits made after exp was branched.  Most of the new
 commits in master need to also be applied to exp, but not all, since
 some of them touch code that has been replaced with a different
 implementation in exp.  (So in this case, exp doesn't add new
 features; it rewrites part of master using a better implementation.)
 
 It seems I need to use cherry-pick (which looks like the equivalent
 of hg export/import.) 
Yes, to me it looks like a case for cherry-picking.

 I suppose this won't break things for the future when exp will finally
 be merged back into master?
It's hard to tell precisely.
Git is rather good at merging, but cherry-picked commits bear no meta
information about what they result from (contrary to merge commits) so
when merging exp back to master, it will be up to textual merging
machinery to detect equivalent text changes in both lines of history.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] http://git-scm.com/docs/git-rebase is (partially) not well formatted

2012-05-14 Thread Konstantin Khomoutov
On Mon, 14 May 2012 02:16:29 -0700 (PDT)
Joel Costigliola joel.costigli...@gmail.com wrote:

 I don't know if this is the right place to point out this
Unfortunately, it's not.
Report on the main Git list (git at vger.kernel.org) which you
can subscribe to at http://vger.kernel.org/vger-lists.html

[...]

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Branching/Merging workflow help

2012-05-14 Thread Konstantin Khomoutov
On Mon, 14 May 2012 05:44:40 -0700 (PDT)
mike mikaelpetter...@hotmail.com wrote:

 We have been using CVS for a long time in our open source project. We
 now have the intention to switch over to git. We use Eclipse.
 It is a relatively small project with 3-5 developers spread all over
 the world and I am mananging/developing this project.
 
 I found this link:
 
 http://git-scm.com/book/en/Distributed-Git-Distributed-Workflows and
 found Integration-Manager
 Workflowhttp://git-scm.com/book/en/Distributed-Git-Distributed-Workflows#Integration-Manager-Workflowgood
 to still have some control. Do I need to make anything specific to
 gain this extra step? Or is there any other way work that would be
 more suitable for a small group?
I would say that integration manager workflow is too heavy-weight for
your case.  I would go this route instead:
* Setup a centralized repo (as you're an F/OSS project, that would most
  probably be done for your anyway by your selected project hoster).
* Grant every developer in your project commit access.
* Devise a suitable branching model and make up a policy which reflects
  this model.  It should be communicated to your developers and to any
  newcomers which are to be granted commit access.

The branching model basically mean how you want to track unstable,
pre-release and released code.
For instance, you could decide that the master branch holds unstable
code, and any time you're preparing the next release, you fork a branch
named, say, 1.2.3 (to indicate a version) off master and all the
development which should land in v1.2.3 goes there.
Or you can have master to always contain stable or at least somewhat
stable code, and have a special branch named, say, devel containing
unstable code, which gets merged into master from time to time, when
it stabilizes.

In any case, the development should be centered around branches: any
feature should be developed on its own branch and then merged to some
other branch which is main with regard to that feature branch.

[1] has a pretty good explanation of how development of a typical
small- to mid-sized Git project might happen, hence recommended to read.

1. http://nvie.com/posts/a-successful-git-branching-model/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git-send-email troubles

2012-05-16 Thread Konstantin Khomoutov
On Wed, 16 May 2012 08:31:03 -0700 (PDT)
Stefan Szabo stefszabos...@googlemail.com wrote:

[...]
  I am trying to use get-send-email on ubuntu.  When I attempt to
  send a message I get this errror: 
 
  Command unknown: 'AUTH' at /usr/bin/git-send-email line 775,
  STDIN line 1. 
 
  Here are my settings: 
 
  [sendemail] 
  smtpserver = smtp.gmail.com 
  smtpserverport = 587 
  smtpencryption = tls 
  smtpuser = fri...@gmail.com 
 
  Any idea what I am doing wrong here? 

 It's two of us... In git version 1.7.9.5 the error has moved to
 line 1140. I can't believe nothing happened on this thread since back
 in 2009! We're either both probably doing something very wrong, or
 noone is using git send-email on ubuntu...

This list is for helping beginners solve their problems with Git.
Bugs in Git should be reported to the main (developers') Git mailing
list which is git at vger.kernel.org.
You can subscribe to it at [1].

There are also rumors about working experimental bug tracker [2],
but I have no idea about its current status.

1. http://vger.kernel.org/vger-lists.html
2. http://git-blame.blogspot.com/2012/02/experimental-git-bug-tracker.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Corrupt Master Branch - want dev branch to be master without screwing things up

2012-05-22 Thread Konstantin Khomoutov
On Tue, 22 May 2012 16:08:54 +0100
Andrew Hardy andrew_ha...@hardysoft.co.uk wrote:

 I did a reset master branch to here and used the wrong reset type I
 think.
 
 Consequeently my master branch was screwed up.
[...]
 Will I just have to keep working with dev3 all the time from now on?

To be honest I faild to understand the explanation I elided, but
judging from the subject, you have two ways to go:

1) Rename branches.  Git has `git branch -m ...` which you can use
   to rename master to something else and then dev3 to master.

2) Reset the master branch to point to the same commit dev3 points to.
   Notice that you will lost the line of history master pointed to
   before resetting so you might want to first fork a branch off master
   or tag its tip commit.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Git has changed my language from English to japanese

2012-05-29 Thread Konstantin Khomoutov
On Tue, 29 May 2012 05:57:59 -0700 (PDT)
Giuseppe giuseppe.rub...@gmail.com wrote:

[...]
 strange fact I suddenly find myself in the language of git japanese I
 can notunderstand what she says ...
 Perhaps some update of ubuntu, which I did ..? are currently at
 version 11.04!
[...]
 The following is a piece of an answer by running git git status 
[...]

Please show what the `locale` command prints to you when you run it in
the same shell you're using to execute `git status`.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Documentation discrepancy

2012-05-31 Thread Konstantin Khomoutov
On Wed, May 30, 2012 at 09:17:35PM -0700, Git User wrote:

 git commit --help
  3. by listing files as arguments to the commit command, in which case
  the commit will ignore changes staged in the index, and instead
  record the current content of the listed files (which must already
   be known to git);
 
 ignore -- unstage
 
 ???

What's the question?  I think it badly misses verbs and other stuff
used by humans to comprehend other humans.

In any case, my quick testing with Git 1.7.2.5 shows that
`git commit filename` in a case when filename is tracked
and has both staged changed and local modifications commits the
current contents of the said file, as found in the work tree.
The staged changes of this file are lost, hence the command works
as if I did `git add filename` followed by `git commit`.

Since (to my knowledge) Git is only able to make commits out of its
staging area (the index), the behaviour of `git commit filename`
is logical and is line with the behaviour of `git commit -a`.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Get a project with .git repository

2012-06-05 Thread Konstantin Khomoutov
On Tue, 5 Jun 2012 17:55:48 +0200
Thomas TREHOU thomas.tre...@gmail.com wrote:

 Can I get my all project just with my .git directory. For example, I
 would like to communicate with someone, but he doesn't have an access
 to my server, can I send him only the .git directory in order to have
 my complete project ?
Look at the `git bundle` command--it was specifically designed for
transferring Git repositories (or parts of them) using sneakernet.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] cannot spawn ssh while trying to push changes to remote (e.g. github)

2012-06-13 Thread Konstantin Khomoutov
On Wed, 13 Jun 2012 14:30:27 +0200
Patryk Małek malekpat...@gmail.com wrote:

 Ok so I have tried to do this  *plink x...@github.com git --version
 * but I have received this error :
 
 *C:\Users\XXXplink x...@github.com git --version
 FATAL ERROR: Disconnected: No supported authentication methods
 available (server sent: publickey)*

This means github only supports public-key-based authentication
(the SSH protocol specifies at least three other, including a
widely-known password-based).  Since you did not add your github key to
your SSH key agent (pageant.exe from PuTTY), plink saw no usable
key and hence failed to authenticate you.

I somehow feel this will be the next obstacle you will run into
so after you fix GIT_SSH (we'll get to that in a moment), be sure
to read [1] which deals with generating and using SSH keys via PuTTY and
[2] which deals with associating those keys with your github account.

 When I set my *GIT_SSH* to *C:\Putty\ * (where I have plink.exe) (I
 have also added  *C:\Putty\*   to *PATH )  *then I get this on *git
 clone  * *
 *
 *$ GIT_TRACE=1 git clone g...@github.com:XXX/AffableBean
 trace: built-in: git 'clone' 'g...@github.com:XXX/AffableBean'
 Cloning into 'AffableBean'...
 trace: run_command: 'C:\Putty\' 'g...@github.com' 'git-upload-pack
 '\''XXX /AffableBean'\'''
 error: cannot spawn C:\Putty\: No such file or directory
 fatal: unable to fork*

Well, Git precisely tells you what happened: it failed to execute
C:\Putty\.  Does attempt to execute a directory appear to be OK to
you?  It shouldn't.  As I've told you in my previous response, the
GIT_SSH environment variable has to be set to the full pathname of the
plink.exe binary which is (probably) C:\Putty\plink.exe in your
particular case.

 What other information should I provide ?
That's already enough.

1. http://nathanj.github.com/gitguide/tour.html#pushing
2. https://help.github.com/articles/generating-ssh-keys

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Git Local files to add on server..

2012-06-13 Thread Konstantin Khomoutov
On Wed, 13 Jun 2012 02:11:51 -0700 (PDT)
Flashman pa...@derwentdata.com wrote:

 I have installed Git on my computer, but my projects are saved on a
 server (long story as to why but is a legacy thing that I can't
 change) can I use Git like that, or do I need to install it on the
 server?
Uh... like what?

Do you mean somehow accessing the server's file sysem (exported using
NFS or CIFS or whatever file sharing protocol)?

If so then yes, that is theoretically possible but it's highly
recommended against for any practical use.  Sensible objections include:
* Git is super-fast, but this means super-fast when dealing with local
  files on a fast storage.  By breaking this assumption you deprive
  yourself of this advantage Git can give you.
* Working with remote files does have certain inherent problems: NFS
  is widely beleived to provide crappy locking (which does not work OK
  in certain circumstances).  Problems with working over CIFS have been
  reported for Git for Windows, and they're unlikely to be dealt with
  as this is not a problem for those who are able to fix it.
* You lose that every repository is a backup advantage, too: should
  your server's FS trash, you won't have a local repository copy.

Next, if you will decide to go for normal Git workflow (you really
should), you *will* need to have Git on the server: no matter what
transport protocol is used to access the server-side Git instance,
in the end, your local Git process always talks to a Git process
running on the server.

To minimize the required amount of file transfers, I would go for this
solution:
1) Install Git on the server.  Verify it works (it can be accessed by
   the protocol(s) of your choice, both fetching and pushing works).
2) Create a repository on the server.  The server usually hosts the
   so-called bare repositories, and adding files to such a repository
   requires a bit of extra work as you'll need to use a detached work
   tree, but it's doable, see below.
3) After recording an initial commit in the repository, clone it
   to your client.

Below is explained how to create an initial commit in a bare repository.

Suppose you have a directory ~/devel/project which you want to turn
into a server-side (bare) Git repo.

1) Create the repo:

   $ mkdir ~/devel/project.git  cd $_
   $ git init --bare

   And make Git know where our repo is located:

   $ export GIT_DIR=~/devel/project.git

2) Create a directory for the throw-away work tree:

   $ mkdir /tmp/worktree  cd $_

   And make Git know where our work tree is located:

   $ export GIT_WORK_TREE=`pwd`

3) Populate it with our project files:

   $ cp -R -l ~/devel/project/* .

   Then add everythhing:

   $ git add .

   (Here you'll probably need to tinker with the added files
until you're happy with what will be committed.)

   Then commit:

   $ git commit -m Initial commit

4) Get rid of the work tree:

   $ cd  rm -rf $GIT_WORK_TREE

At this point you can return back into your $GIT_DIR and run
`git branch` and `git log` there to see that you have recorded an
initial commit on branch master.

Now on your client you can do

$ git clone ssh://you@git.domain.local/~/devel/project.git

and see your repo cloned into the project directory.

You can repeat this step for any repo you need to create on the server.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] about git format-patch help

2012-06-13 Thread Konstantin Khomoutov
On Wed, 13 Jun 2012 02:32:25 -0700 (PDT)
lei yang yanglei.f...@gmail.com wrote:

 In my tree from git log I can see the last commit
 
 commit 1c8284ebdbd119314b8f01e442e64cf5fd4b9fe6
 Author: Mathieu Desnoyers mathieu.desnoy...@polymtl.ca
 Date:   Fri Sep 3 08:08:18 2010 -0400
 
 LTTng modularization, import of lttng 0.226
 
 Will match kernel tree lttng 0.227.
 
 Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com
 
 to get the patch I run 
 
 lyang0@lyang0-OptiPlex-755:~/git/lttng-modules$ git format-patch 
 1c8284ebdbd119314b8f01e442e64cf5fd4b9fe6^..1c8284ebdbd119314b8f01e442e64cf5fd4b9fe6
 fatal: ambiguous argument 
 '1c8284ebdbd119314b8f01e442e64cf5fd4b9fe6^..1c8284ebdbd119314b8f01e442e64cf5fd4b9fe6':
  
 unknown revision or path not in the working tree.
 Use '--' to separate paths from revisions
[...]

I think you'd better post this to the main Git list
(git at vger.kernel.org, you can subscribe to it at [1]) as this might
indicate a bug.

To try to solve the problem at hand: does

git format-patch -1 1c8284ebdbd119314b8f01e442e64cf5fd4b9fe6

work for you?
According to the docs, this has to export the changeset of just the
single indicated commit.

1. http://vger.kernel.org/vger-lists.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] how to change the whole git tree to the patchsets

2012-06-13 Thread Konstantin Khomoutov
On Thu, 14 Jun 2012 01:03:27 +0800
lei yang yanglei.f...@gmail.com wrote:

 I want to change my whole tree to the patchset? which cmd can be
 used ?

git format-patch --root

Did you RTFM?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] GIT with limited CPU time?

2012-06-14 Thread Konstantin Khomoutov
On Thu, 14 Jun 2012 01:41:40 -0700 (PDT)
renne renne.bart...@googlemail.com wrote:

 I'm new to GIT and this group, so a Hello to all! :)
 
 GIT is installed at a Shared Hoster for versioning the Web content. :)
 
 But the SSH access has a CPU time limit, too, which breaks push and
 pull. :(
 
 Is there any way GIT can handle incremental push/pulls?
Sure it does: just push less that full history of a branch.

Say, your master branch has this history:

...--A--B--C
  ^ master ref points here

then you can just push A or master~2 then B or master~1 and so on,
like in

$ git push server master~2:master

Of course, series of commits can be longer, not just one commit, this
is just an example.

Another, completely different approach might be to use git-ftp [1]
for deploying: it's not as efficient that Git, but is able to transfer
only the files changes since the last upload (and also it takes care of
file/directory renaming/removal, when needed).  If your hoster does not
charge for using FTP, this might be a convenient escape route.

1. https://github.com/resmo/git-ftp

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] how to get the commit id from one file or multi file

2012-06-14 Thread Konstantin Khomoutov
On Thu, 14 Jun 2012 23:53:30 +0800
lei yang yanglei.f...@gmail.com wrote:

  Can we get the commit id list for one file or multifile?
 
  Lei
 
  What do you mean by commit id?
 
 
 I mean the file in git tree has lots of commit, I want to get the
 commit list for this file

$ git rev-list --all -- filename

or

$ git log --format=%H -- filename

Note that Git does not explicitly record file renames (contrary to
certain systems like Subversion, which do), and to compensate for this
when using `git log`, Git has to be told to use special heuristics.
So if you need this, you should probably study the --find-renames
command-line option to `git log`, and, possibly, --find-copies
and/or --find-copies-harder as well.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to get the formated patches from the merge id

2012-06-15 Thread Konstantin Khomoutov
On Fri, 15 Jun 2012 19:46:22 +0800
lei yang yanglei.f...@gmail.com wrote:

 I have a commit like below
 commit 0e93b4b304ae052ba1bc73f6d34a68556fe93429
 Merge: b724cc1 51bfd29
 
 This commit done this work: merge b724cc1..51bfd29 commit,
This is a gross misunderstanding of how revision ranges work in Git.
Please read the gitrevisions manual page.
More precisely, the A..B notation means All commits reachable from B
excluding those reachable from A.
A merge means that two lines of history (those ending with commits
b724cc1 and 51bfd29, respectively) are merged together.
Writing this as b724cc1..51bfd29 is incorrect and confusing for
the readers.

 The question is how could I *onlys* through
 0e93b4b304ae052ba1bc73f6d34a68556fe93429 to get the formated patch for
 the commit(b724cc1..51bfd29)
This phrase again missies a predicate (a verb) so we consistently
fail to comprehend your intent.
You could try to find a colleague with a bit better English skill and
ask his/her to provide a better translation so we're able to understan
it.
Also try to get rid of that .. notation as it seems to ruin your
attempts to get us understand the matter.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] How to see the which file changead between two commit and plus with commit id

2012-06-16 Thread Konstantin Khomoutov
On Sat, Jun 16, 2012 at 05:43:14PM +0800, lei yang wrote:

 I know below command can get which file changed between the two commit
 lyang0@lyang0-OptiPlex-755:~/git/kernel-3.4.x$ git diff --name-only
 16d815fd230b81d49d395e91b084f0731ea6e4a2^..3e5f29bd22e597d66d9c1013a0ab190e6b48a8ba
 drivers/i2c/busses/i2c-davinci.c
 drivers/i2c/busses/i2c-tegra.c
 
 can we show the info with which commit changed the file ?

Use `git log` for this:

$ git log --format=%H --name-only

would output, for each commit, a SHA-1 name of that commit,
a blank name and then the list of files affected by that commit.

Note that `git log` accepts quite a number of option `git diff` supports
(since `git log` calls `git diff` in certain modes of its operation)
so read the `git log` manual for more info.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] URL/Link to preview the Changes you Make

2012-06-16 Thread Konstantin Khomoutov
On Fri, Jun 15, 2012 at 10:03:22PM -0700, Erixcus wrote:

 I am new to Sandbox so i will appreciate your quick help..
 
 I know how to clone files, make changes and push them to Sandbox but i dont 
 know to preview the website in the frond end within Sandbox. Is there a 
 URL/Link which we type in the browser and preview the web pages in the 
 Sandbox?
 If NOT, what do we use to preview the changes we made?
I wonder what makes your think the subscribers of this list
readily know what this Sandbox thing is?
I, for one, hear about it for the first time, and this makes me think
its connection to Git is quite weak (and we discuss just Git itself
here).
So better try to ask your question on some list/forum/whatever dedicated
to that Sandbox thing.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] How to make a new branch with a portion of a branch?

2012-06-18 Thread Konstantin Khomoutov
On Sun, 17 Jun 2012 09:12:26 -0400
Eric Parent parent.eri...@gmail.com wrote:

I've been working on a branch, say '2.1' and made a few commits on
 it. We've made a release and tagged the changeset at which the commit
 was produced, say 'tag2.1'.
 
Development continued and a few more commits were made on that
 branch, the '2.1'.
 
As the development goes, we think it would be a better idea to
 create a branch '2.2' that starts at the tag where the release was
 made and keep '2.1' only for the maintenance of that release.
 
 So here's what we have at the moment:
 
  (tag2.1)
 branch 2.1 :  A   -   B   -   C   -   D   -   ...- K
 
 Here is what we would like to have:
 
 
 changesets C up to K to be on a branch 2.2 starting at 'tag2.1':
 
 (tag2.1)
 branch 2.1: A   -   B
 branch 2.2:-   C'   -   D'   -E'   -   ...-
 K'
 
 Any hints?

0) $ git checkout 2.1
1) $ git branch 2.2
2) $ git reset --hard tag2.1

This will:
1) Create a branch named 2.2 which points to the same commit
   the branch 2.1 currently does.
2) Make the 2.1 branch point to the same commit the tag tag2.1
   points (effectively truncating the branch).

You will have to forcibly push your 2.1 branch to your authoritative
(central) repo if you have it.

Your confusion about how to achieve what you want probably stems from
the fact you think a branch is something special, while in git both
tags and branches are simply references to a specific commit.
What constitutes a line of history then is commit chanining: each
commit references one or more parent commit(s) (except for the root
commit in a repository which references nothing).

Tags and branches are only different when it comes to committing
(committing on a branch updates the reference while committing when you
have a tag checked out does not update anything).

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git pull asks for commit comment

2012-06-20 Thread Konstantin Khomoutov
On Tue, 19 Jun 2012 12:02:26 -0700 (PDT)
Dan Hirsmuller-Counts xpemda...@gmail.com wrote:

  This is one of the recent changes in Git to make it more user
  friendly. More specifically in this point, help users avoid these
  automatic merge messages that can sometime be a bit ugly.
 
  From http://git-scm.com/docs/git-pull :
  --no-edit
 
  Invoke an editor before committing successful mechanical merge to
  further edit the auto-generated merge message, so that the user can
  explain and justify the merge. The --no-editoption can be used to
  accept the auto-generated message (this is generally discouraged).
  The --edit option is still useful if you are giving a draft message
  with the -m option from the command line and want to edit it in the
  editor.
 
 How is it more user friendly to make the user submit a message every
 time they do a PULL? To me the merge caused by a pull is just assumed
 and I cannot think of a situation where I would modify the default
 merge message. 

Because you're not doing pull, you're merging someone else's changes
into your changes, and this produces a state of the codebase which has
to be tested.  To put it differently, you're usually not just pull,
you make a conscious decision to reconcile two (or more) diverging lines
of development, and this is *not* a no-brainer automated thing.
If you do not beleive this, read this post [1] (the Disaster 2:
Merging Without Understanding part, specifically) which has been
recently referred to in [2].

P.S.
Please don't top-post.

1. http://www.randyfay.com/node/89
2. http://stackoverflow.com/q/11058312/720999

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Documentation discrepancy

2012-06-21 Thread Konstantin Khomoutov
On Wed, 20 Jun 2012 18:52:52 -0700 (PDT)
Git User usv299792...@gmail.com wrote:

[...]
 One more question.
 Is there an option to commit only specified files in their staged
 state without doing `git add' on them ?
There's a contradiction in your question: the staged state is
the state of the files as recorded in the staged area (in the index),
and the current (as in the work tree) state of files gets recorded in
the index by doing `git add` on those files.

A simple example (suppose the aaa.txt file did not exist):

$ echo one  aaa.txt
$ git add aaa.txt

At this point, aaa.txt is recorded in the index.
It's staged state is no different than its current state.

$ echo two  aaa.txt

At this point, the staged state of aaa.txt is different
from its current state as this file has been modified
in the work tree, but the changes were not recorded.

If you do `git commit` at this point, the staged state will be
recoded, not the current stage (what's in the work tree).

P.S.
I also can imagine that you actually wanted to ask is there a way to
commit the state of a set of files as present in the work tree without
going through adding them to the index?.  If this is indeed the case,
then the answer is yes.
First, you can use
$ git commit -- file1 [file2 ...]
which will effectively do `git add` on the specified files and then
commit the changes.
Second, you can do `git add -u` to record changes in all tracked files
to the index.
Third, you can do
$ git commit -a
which effectively is `git add -u` + `git commit`.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Documentation discrepancy

2012-06-22 Thread Konstantin Khomoutov
On Thu, 21 Jun 2012 18:06:29 -0700 (PDT)
Git User usv299792...@gmail.com wrote:

 Thank you.
 Here is what I meant:
 echo alpha  a.txt
 add a.txt
 echo beta  b.txt
 add b.txt
 echo gamma  b.txt
 
 Now I have a.txt and b.txt in staged state; and b.txt also has
 unstaged changes.
 I want to commit ONLY b.txt (i.e. I want to commit only 'beta' and
 leave b.txt in modified state with 'beta'  'gamma' in it, 'gamma'
 being showed as '+gamma' in `git diff'.
 Something like `git commit --staged b.txt'
 In other words, how do we `git commit' just one file from the index
 if there are more than one files in the index.

I think you can't as you effectively wish to have one more level of
indirection (the second index).

I can imagine various workarounds to achieve what you want but they all
are imperfect in one way or another.

The proper way to do this probably would be to write your own porcelain
command that would:
1) Save a list of files with staged changes.
2) Reset all of the staged entries except for those files you specified.
   If any file to reset has unstaged local changes, refuse to proceed.
3) Commit.
4) Re-add the files that were reset on step (2).

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Documentation discrepancy

2012-06-25 Thread Konstantin Khomoutov
On Sun, 24 Jun 2012 18:46:03 -0700 (PDT)
Git User usv299792...@gmail.com wrote:

 Thanks to everyone.
 Just one more thing:
 If we could exclude that `git add file' part from `git commit file',
 we would get the desired behavior, wouldn't we?
 It seems to me like `git commit --staget file' is a subset of the
 operation `git commit file'.
 Or I'm wrong ?
You seem to be wrong.
Seems like you did not grasp the concept of the Git staging area.

Git is different to many (all?) mainstream DVCSes in that it cuts its
commits not from your work tree but from a special virtual area
called the index or the staging area (earlier in Git's life it was
also called the cache).
Initially the index is empty, you then do local modification to your
files and record *just those changes you want to be committed* by using
`git add filename`.  When you subsequently call `git commit`, it's
the state currently maintained in index that gets committed, not the
changes in your work tree.

Alternatively it might turn out that you've been trained by some sloppy
person to always use `git commit -a` which means (`git add -u` + `git
commit`).

So supposedly what you should use to achieve your original goal, is to
just `git add` the only file you need (to stage for committing only
those file's changes), do not add any other changed files and then
commit.  The resulting commit will contain only the changes made
to that single file.

Note that `git add` supports one super-handy option, --patch, which
even allows you to interactively pick single changes from the locally
modified file and stage for commiting only those you want leaving other
changes intact.

One good introductory read on this matter is the first part of [1].

1. http://git-scm.com/2011/07/11/reset.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Documentation discrepancy

2012-06-26 Thread Konstantin Khomoutov
On Mon, 25 Jun 2012 22:23:35 -0700 (PDT)
Git User usv299792...@gmail.com wrote:

 Thanks again.
 
 It seems I didn't express myself clearly. OK, let me elaborate on
 specific examples:
[...]

Sorry, have no time to read thoroughly at the moment -- will come back
to it later and try to grasp.

  If it's too cumbersome an explanation, could you please tell me how
 to see which plumbing commands are executed with a specified
 porcelain command (something like a trace or debug feature)? I could
 have then decomposed `git commit' and `git commit file' into
 low-level commands and craft my own porcelain command based on those
 plumbing commands.
Export GIT_TRACE=1 before running Git commands; like

$ export GIT_TRACE=1
$ git commit ...

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git push fine, git pull not seeing changed

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 01:40:56 -0700 (PDT)
Avner Tamir avner.ta...@hp.com wrote:

 we are facing a strange problems:
 when we push to remote repo code is pushed successfully and we do see
 the commits and code being pushed via gitweb.
 when we try to pull from remote repo, we are getting a message all
 up to date but we do not see new code.
 to make things more interesting we do see on client machine that HEAD
 is pointing to the right commit.
 we are using http, our repo is on apache (httpd), OS is RHEL 5.7
Isn't this a standard problem with not running an appropriate hook
after pushing?  See the My HTTP repository has updates, which git clone
misses. What happened? question in the FAQ [1].

1. https://git.wiki.kernel.org/index.php/GitFaq

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git erase everything

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 03:55:03 -0700 (PDT)
lem torov ulem...@gmail.com wrote:

 i was using netbeans ide and as CVS i was using git included into IDE.
 
 once i lanch standalone git-msys in my project directory
 git branch
 showed me
 ** no branch
   master
   you are not in any branch
 *
 i did 
 *git checkout master*
 and i lost like 5 weeks of my work. if there is any way to restore it?

Follow the advice given by Aneesh.

And to get hold of this detached HEAD concept, read this:
http://sitaramc.github.com/concepts/detached-head.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git erase everything

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 04:29:45 -0700 (PDT)
lem torov ulem...@gmail.com wrote:

 I follow you tutorial
Actually, I gather that this more modern guide [1] written by the same
author is indeed better (linked from the original tutorial).

1. 
http://sitaramc.github.com/gcs/index.html#gcs_index_detached_HEAD_and_all_that_

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git erase everything

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 05:01:55 -0700 (PDT)
lem torov ulem...@gmail.com wrote:

   I follow you tutorial 
  Actually, I gather that this more modern guide [1] written by the
  same author is indeed better (linked from the original tutorial). 
 
  1. 
  http://sitaramc.github.com/gcs/index.html#gcs_index_detached_HEAD_and_all_that_
   
 
 
 question is not what is head  or what is detached head. question
 is how did i get into no branch branch. why there is no any notice
 when i did commit into no branch.
 and if commits are registered why those commits doesnot contain files
 which i did commit into it.

In your original mail you stated:
i was using netbeans ide ...
hence the only sensible answer to the first two questions is ask
netbeans folks.

With plain Git, there are several ways to get into the detached HEAD
state; they are all summarised in the article I referred to.

Making a wild guess, I suspect that your IDE allowed you to check out a
remote branch or a tag.

The last question is more tricky.  One possibility is that your guess
about what commit the HEAD was pointing to before you checked out a
branch was wrong.  Try looking at your reflog more carefully, make
temporary tags or branches out of any commits you think might be the
correct lost HEAD and inspect them one by one until you find the right
one.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git erase everything

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 05:07:16 -0700 (PDT)
lem torov ulem...@gmail.com wrote:

 As do understand git copies all files into .git/objects folder and
 all this files compressed so i cant use grep to find files which i
 need. if there tools to view tree of commits and files include losted
 commits so i can recover everything manually. i need at list to find
 one latest build jar file so i can diassembly it and recover my work.
I recommend you to calm down and get hold onto that reflog concept.
You did not lost your work if you did commit it.  You just need to
deduce the correct ex-HEAD commit from the `git reflog` output of your
repo.

By the way, if you need a quick assistance consider joining the Git's
IRC channel--chances are good there will be someone to help you
through the recovery process.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] How to add the branch from another tree to my local branch

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 20:34:34 +0800
lei yang yanglei.f...@gmail.com wrote:

 As the title, thanks in advance
Please try to rephrase as it appears you're using wrong terminology.

A tree is a collection of files.  For instance, each commit refers to a
tree which captures the state of files that commit refers to.
Hence the statement a branch from another tree has no sence: trees do
not have branches, repositories do.
So did you mean branch instead?

Next, what do you mean by using the add ... branch .. to ... branch
statement?  You can't add two branches, this has no sense.
Did you mean merging?  Or what?

I can try to guess you wanted one of these:
1) Make a certain branch from a certain (remote) repository to appear in
   your local repository.
2) Merge a certain branch from a certain (remote) repository with one
   of the branches in your local repository?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git clone fails with error: RPC failed; result=22, HTTP code = 401

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 07:27:36 -0700 (PDT)
Thomas Ferris Nicolaisen tfn...@gmail.com wrote:

 I think this is a bit on the advanced side of things we usually
 answer on this list, so you could try asking on the git development
 list (described here http://git-scm.com/community).
He already did that.
Mentioning the fact of cross-posting seems to be a lost art from the
long-forgotten Usenet times.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Git sign a tag and commit

2012-07-10 Thread Konstantin Khomoutov
On Mon, Jul 09, 2012 at 11:31:15PM -0700, Thomas Ferris Nicolaisen wrote:

  Can we use Entrust Digital SW to sign tags and commits instead of gpg?
 
  Please guide me how to achieve this.
 No, GPG is the only way of signing.

On the other hand, the gpg.program configuration option can be used to
specify an alternative binary for signing.
Supposedly if one is able to create such a binary wich wraps that
Entrust Digital SW thing and mocks the way GPG works as expected by
Git, this might in theory work.

Another thing is, AFAIK a signed tag just has an ASCII representation
of its GPG signature embedded into the tag object.
Hence one could possibly try with creation/verification of signed tags
using some external software which should provide signed tag of valid
format.  I'm inclined to think the most of Git is not concerned much
which what exactly that signature bit contains unless Git is asked
to verify it.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] local repo, clone and push doesn't work as needed

2012-07-10 Thread Konstantin Khomoutov
On Mon, 9 Jul 2012 00:11:40 -0700 (PDT)
Michel msimi...@wanadoo.fr wrote:

[...]
 Now, using git, I clone the git repo to do some work.
 To be sure to have all files in my clone, I do a git checkout 
 special_tag_before_import then I modify the above files, for
 example, and I commit them. The push says Everything up-to-date
 
 So, in my mind, I say : OK, the origin is not in the same checkout
 state... So, I do the checkout special_tag_before_import in the
 first git repo, and redo a clone like that
 In this 2nd clone, after commiting some tests modifications, the
 push says Everything is up to date...
 
 So, where is my fault ?

The problem is somewhat complex to explain.

The idea is that Git has branches and tags, but while they all are
named references to commits, they differ in that when you check out a
branch and record a new commit, the branch pointer is updated to point
to that new commit.  If you check out a tag and record a new commit,
the tag is (obviously) not updated, and since tags do not belong to any
branch, no branch pointer is updated as well.  More precisely, when you
check out anything which is not a branch (you can happliy check out any
commit at all just by specifying its SHA-1 name), you end up being in
the so-called detached HEAD state: each time you commit, that commit
does not belong to any branch, and the only reference which points to
it is the HEAD reference.

That was the explanation of what happens when you commit in your
situation.  Note that this situation is a bit dangerous as if you
decide to check out any branch while being in this detached HEAD
state, you will lose a convenient reference to your series of commits.
They will not be lost, but getting hold onto them will require some
extra work.  So if you committed something valuable, consider running
something like
$ git checkout -b my_new_branch
at this point to turn your series of developments into a branch (more
details below).

The problem with push is largely unrelated to this one.
The behavior of Git when you push heavily depends on what you pass to
`git push` and how is your repository configured with regard to pushes.

First, you can tell `git push` precisely what to update on the remote
side with which series of local commits.  For instance, you can do
$ git push origin HEAD:refs/heads/master
and that would make the master branch in the remote repo be updated
with what the HEAD in the local repository currently points at.

Second, if you call `git push` with just the name of a remote repo, like
$ git push origin
then Git figures out what to push by consulting the push.default
configuration variable [1] which defaults to the value matching which
means Git tries to push local branch master to remote master, local
branch foo to remote branch foo and so on for all the local
branches [2].
Now, since your commits did not update any branch (above, I explained
why), your simple `git push remote` has nothing to update the remote
side with--everything is exactly up-to-date.

Let's now consider how you should change your workflow.
The first thing you should do is to fork a branch off your
special_tag_before_import tag.  Now you can check it out and be sure
any commit you do will move that branch forward.  You can then push
that branch to the remote repo.
The second thing to do is to read a good book on Git to get firm hold
on the concepts.  Pro Git [3] is highly recommended.

1. In fact it might be even more complicated as you can specify
   per-remote rules for pushing.
2. Read the `git config` manual about the values the push.default
   option might take and how they change the behaviour.
3. http://git-scm.com/book/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] updating a fork from master?

2012-07-10 Thread Konstantin Khomoutov
On Tue, 10 Jul 2012 08:55:57 -0700 (PDT)
Michael. temp4for...@gmail.com wrote:

 I'm trying to contribute some documentation to a larger project for
 which I created a git account and forked from the project's master
 via the github web page.
 Via the local github mac-application I created a local copy where I
 can work on.
 In order to avoid to work on outdated documents, is there a way where
 I can update my fork from the master with showing me possible
 conflicts? I.e. in case I already altered a file locally and/or my
 online fork while somebody else also worked on the same document.

First of all, Git does have remote tracking branches and your local
branches.  Supposedly you cloned the project so that the github repo is
now the single remote named origin in your local repo and the remote
branches are stored as origin/master and so on (you can look at them
by running `git branch -a`).  Most probably, after you cloning and
created your local branch, it was forked off one of those
remote-tracking branches which were created automatically by
`git clone`.

Now you can just run `git fetch origin` to get those remote-tracking
branches (named origin/whatever) be updated without disturbing your
local work.

After that, you can simply review what's changed by running something
like
$ git diff master origin/master
and
$ git log origin/master..master
and so on.

The next step is to try to integrate your own developments with
upstream's developments.  There are two ways to do this--merging and
rebasing--and which one to pick depends on the project's policy and
your personal taste.

Supposedly you will want to rebase your work; this is achieved by
running something like
$ git checkout master
$ git rebase origin/master

Now you have to read up on the concepts: 

http://git-scm.com/book/en/Git-Basics-Working-with-Remotes
http://git-scm.com/book/en/Git-Basics-Working-with-Remotes
http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
http://git-scm.com/book/en/Git-Branching-Rebasing

and better the whole chapter 3 in that book.

Even better--the whole book except the bits which might be of no
interest for you, like Git on the server or Git and other systems.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Copying public keys from mac to pc

2012-07-10 Thread Konstantin Khomoutov
On Mon, 9 Jul 2012 17:16:48 -0700 (PDT)
Jackson Beale jackson.be...@gmail.com wrote:

 I have copied my public and private keys from my mac to my pc. I am
 using git bash. The keys work fine on the mac. I have put the keys in 
 users/owner/.ssh and used the following permissions:
 
 chmod 700 ~/.ssh
 chmod 600 ~/.ssh/*
 chmod 644 ~/.ssh/known_hosts
 
 When I try and clone the remote repo, I am asked for a password. Any
 ideas?
What's the contents of your GIT_SSH environment variable?
Does it exist at all?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git checkout . overwrites all my changes

2012-07-12 Thread Konstantin Khomoutov
On Thu, 12 Jul 2012 18:36:48 +0400
Serge Matveenko se...@matveenko.ru wrote:

  In essence, checkout is the equivalent of what some other systems
  call revert, and you have to get used to treating it with respect
  (as with any git command).
 IMHO, it looks more like switch usually.

I wonder what SCM system you have in mind saying this.

Mercurial and Fossil use revert to achieve what's being discussed.

And I know one SCM which uses the switch subcommand--that's
Subversion, and it uses `svn switch` for changing branches under the
local checkout.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] mergetool bug when merging ignored files from stash

2012-07-16 Thread Konstantin Khomoutov
On Mon, 16 Jul 2012 07:09:36 -0700 (PDT)
sophana soph...@worldspot.net wrote:

 I'm quite a git beginner. I'm still evaluating git with git-svn
 v1.7.1 on rhel6.
 I think I found a bug in git mergetool, but as I'm a beginner I'm not
 sure.
[...]
 Hope this helps.

Unfortunately, this list is for solving problems beginners have with
Git, not problems with Git itself.

Please post your message to the main Git list which is
git at vger.kernel.org
(you can subscribe to it at [1]) and it will be read by Git developers.

1. http://vger.kernel.org/vger-lists.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] diff on ubuntu 12.04

2012-07-18 Thread Konstantin Khomoutov
On Wed, Jul 18, 2012 at 04:10:19PM -0700, Bart Baker wrote:

 I apologize if this is a repeat post, but I haven't been able to find this
 issue referenced. I'm running git on Ubuntu 12.04. Most of the commands work
 fine, but I'm having trouble with git diff displaying any output. If I run:
 
 $ git diff
 $ 
 
 on a repo that definitely has changes, I do not see any output. If instead
 I run:
 
 $ sudo git diff
 
 I get the expected git diff output, spread over multiple pages. I installed 
 git
 using apt-get, but there seems to be some sort of permissions error. Is 
 there
 a certain git core file that I need to change the permissions on?
Try running `git diff` so that is sees the GIT_TRACE environment
variable set to 1, and post the output here.
Like this:
$ export GIT_TRACE=1
$ git diff

Do the same for the sudo case; but this should be handled differently
(since, I think, sudo might sanitize the environment):
$ sudo su
...
# export GIT_TRACE=1
# git diff

You can then try to compare what gets called in each case.

Another question: do you have the PAGER environment variable defined?
IOW, what does
$ echo $PAGER
output?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] diff on ubuntu 12.04

2012-07-19 Thread Konstantin Khomoutov
On Thu, Jul 19, 2012 at 06:04:32PM -0400, Bart Baker wrote:

[...]
  Try running `git diff` so that is sees the GIT_TRACE environment
  variable set to 1, and post the output here.
[...]
 $ sudo su
 # export GIT_TRACE=1
 # git diff
 trace: built-in: git 'diff'
 trace: run_command: 'pager'
 trace: exec: 'pager'
 diff --git a/tp_proj.py b/tp_proj.py
 index 3adcb6d..85b98f5 100644
 --- a/tp_proj.py
 +++ b/tp_proj.py
[...]

Can you please verify you do have sensible permissions on your work
tree files and the stuff under .git?
Sounds a bit insane, but people repeatedly post questions on SO having
problems after cloning a repo as root (for bizzare reasons) and then
attempting to work with it as a regular user.  (Well, Git usually seems
to complain about this loudly but let's pretend your case is special.)

The simplest way to check is to run
$ ls -lR | less
in your work tree and look for something suspicious.

A more elaborate and automated way would be to run
$ find . \! \( -user you -a -group you \) -print
in your work tree with you replaced by your user name and primary
group name (or whatever group your project directory is supposed to
have; usually it's the same as your user name).

  Another question: do you have the PAGER environment variable defined?
[...]
 There was not output returned for echo $PAGER
Okay, this means you have a /usr/bin/pager symlink maintained by the
system.

Please now show the results of running the following commands.

$ update-alternatives --display pager

This is just to see what the system thinks your pager is.

$ type pager

# type pager

See if they differ.  They shouldn't, but if they do, this would explain
much.

$ echo $PATH

# echo $PATH

Actually, this is only interesting if you and root see different pagers.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to change message of old commit

2012-07-21 Thread Konstantin Khomoutov
On Sat, Jul 21, 2012 at 07:43:31AM +0530, Rustom Mody wrote:

  I suspect that you are in rebase mode. That is, you're in the middle of
  rewriting som history, and Git is waiting for you to type things like git
  rebase --abort or git rebase --continue. If you just want to get out of
  this mode, I reckon also a git reset --hard master should get you back to
  how you left things in master branch.
 
 
 It is said about vi: The text editor with two modes... one that beeps and
 one that corrupts your file
 
 Currently I have the same expertise at git that I had when first learning
 vi (many years ago)
 
 Can I find a summary of 'git modes' somewhere?
Please stop inventing bullshit.  It's natural, that when you're starting
an interactive (!) rebase and then tell git you want to edit a commit,
Git has to be told when you're done with your edits.  And when Git
stops carrying rebase steps at the commit you told it you want to edit,
it tells you in clear words what to do when you're done:

foo% git rebase -i HEAD~3
Stopped at 183fe3c... 3rd commit
You can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

You did not pay attention to this (quite wordy) message and are now
trying to make up sarcastic jokes.  Please don't.  Start from reading
`git rebase` manual, in particular the --abort option to `git rebase`.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] SSH keys required for SSL authentication/authorization?

2012-07-21 Thread Konstantin Khomoutov
On Fri, Jul 20, 2012 at 02:10:05PM -0700, TSU wrote:

 Yesterday I observed on the Git IRC a conversation that SSH keys were not 
 required for SSL sessions( would have responded if my Freednode account 
 wasn't having problems). 
 
 Aside from the fact (AFAIK) github only supports SSH for key testing and 
 nothing else, I was under the impression these same keys are re-used for 
 authenticating SSL sessions as well, implementing a kind of 2-factor 
 authentication (SSL keys to prove your machine, username/password to prove 
 your human identity).
 
 Are SSH keys required or not for SSL connections?
I don't quite understand the question, but let's just try some things
clear -- maybe this will help you.

First, SSH and SSL have nothing in common except for the word [S]ecure
and the naturally following fact they secure something (SSH secures the
[SH]ell access and SSL secures the [S]ocket [L]ayer).  These are
completely disjoint protocols invented for differing needs.

These protocols also use different approach for what you call keys.
SSH uses shallow approach to keys: a client generates a pair of
keys -- one public and one private, -- then transfers the public part to
the server and adds it to an *explicit* list of trusted keys.  Hence the
server either trusts that key or not; nothing else.  The client actually
does the similar thing by checking the server's key's fingerprint to see
if it's known and trusted.
SSL uses hierarchical approach to its keys, which it calls
certificates: this stuff involves certification authotities (CAs) and
trust chains they create.  The whole topic is too deep to cover here but
the end result is that usually either side or both explicitly trust some
CA, and through this fact they tust each other.
In either case, the wire format of the keys used by these protocols and
the semantics of their usage is different.

One last thing to note is that while SSL/TLS is based solely around
those X.509 certificates, SSH defines various methods for authentication
of the client to the server: besides the pubkey method we've just
discussed, it supports the very popular keyboard interactive method,
Kerberos authentication and GSSAPI (SSPI in Microsoft lingo) which can
also do Kerberos.

So no, the same keys can't be used for both SSL and SSH.

As to github, I think they implement two modes:
1) SSH keys are used to access the repo via SSH.  You associate your SSH
   key with your github account and so when you're trying to
   authenticate the next time, Git knows who you are from your key.
2) SSL is used to simply encrypt the conversation with the server, and
   then HTTP (which tunnelled over SSL) uses simple password-based
   authentication method called basic to verify your identity.
   See https://github.com/blog/642-smart-http-support for hints on this.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] how to git format patch without swith to that branch

2012-07-23 Thread Konstantin Khomoutov
On Mon, 23 Jul 2012 23:43:50 +0800
lei yang yanglei.f...@gmail.com wrote:

 I want to format patch from branch A, but current branch is B, is it
 possible to format patch without switching to B?
Yes.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] New user gets lost driving the Git Bash

2012-07-24 Thread Konstantin Khomoutov
On Mon, Jul 23, 2012 at 04:13:50PM -0700, Jeffery Brewer wrote:
 Aha! Figured out that after installing on windows you don't go to a command 
 line directly, you have to go through Start  All Programs  Git  Git 
 Bash which gives you a different kind of command line.
[...]

Note that you don't *have to* use Git bash: everything just works in the
regular cmd.exe.  Actually, the existence of Git bash is due to some
parts of Git are written as Unix shell scripts so Git for Windows has to
ship with a shell implementing POSIX semantics.

There's no consensus in the Git for Windows community on what shell to
use for interactive work with Git.  I, for one, prefer cmd.exe as I tend
to use the shell not only for Git.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] New user gets lost driving the Git Bash

2012-07-25 Thread Konstantin Khomoutov
On Tue, 24 Jul 2012 14:38:19 -0700 (PDT)
Graham Jans graham.j...@gmail.com wrote:

[...]
 There's no consensus in the Git for Windows community on what shell
 to use for interactive work with Git.  I, for one, prefer cmd.exe
 as I tend to use the shell not only for Git. 
 As Konstantin says, there's no consensus. However, I recommend using
 Git Bash, as it makes utilizing small script snippets etc. that you
 find around the net more accessible (because you don't have to
 translate them to windows-style, can just use them in the
 unix-style presented.
This is indeed a valid point.
But this is an advanced technique which is not really needed to just
use Git or get started with it.

 As well, getting the various bits of Git Bash to work in cmd.exe
 requires choosing the correct options when installing; the installer
 has a big red warning here so most people choose not to do that.
Because most people don't really need that.
Having only git front-end script (git.cmd) in the PATH is sufficient
for usual workflows.

 As well, the coloring doesn't work for me in cmd.exe.
Coloring does work OK for me after setting the core.ui configuration
variable to auto.  Both in the command prompt and in the built-in
pager (less).

 So all in all I recommend using Git Bash at least for learning.
I tend to disagree: using a unix-y shell in a Windows environment does
have rough edges; if a person has little experience with command-line
(I think he stated exactly this), I'd say it's better to learn native
tools first.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] New user gets lost driving the Git Bash

2012-07-25 Thread Konstantin Khomoutov
On Tue, 24 Jul 2012 13:01:32 -0700 (PDT)
Jeffery Brewer jeffery.bre...@gmail.com wrote:

 Continued thanks for all the help. I'm sorry to be so slow at
 this...I've just done very little command line operation in the past
 and probably shouldn't even be allowed near computers at all. I have
 very little experience on Linux/Unix as well, so I'm really
 floundering around in the dark here. I learned ls yesterday though,
 so I'm getting there.
 
 So when you say cmd.exe you're talking about just a normal windows 
 command line prompt?
Exactly.

 Like you go to Start and type cmd?
Yes.  No matter how you run it, cmd.exe is the process which presents
you with the regular Windows command line prompt.

 I tried that initially but only got errors (e.g. $ not recognized).
You've fell victim of a typical assumption of the authors of most
books/guides/blog posts that the reader is familiar that this symbol
denotes a command-line prompt.
While this prompt is easily tweakable in any interactive Unix-y
command-line shell (which are available in abundance, by the way), the
usage of the '$' character in the most common default setting
(including the shell found on Mac OS X). 

 Wasn't until I stumbled on the Git Bash thing that I could make Git
 work at all.
That's pretty strange.
One reason I could think of is that you did not opted for Git to be
included in your PATH when you were installing Git for Windows, so may
be when you typed git in the windows command prompt, it told you that
program is not found, was it?

 I know there are GUI's available, but I have a big desire to develop
 some command line skills and this seems like a reasonable place to
 start. I figured how to commit files yesterday! Woo hoo! All that
 seemed to go reasonably well until I did the diff command, which had
 me lost until I finally typed h and got the help screen. 
Yeah, you were interacting with the pager called less which is
ubiquitous on Unix platforms and which Git for Windows packages for
convenience (the stock pager available in Windows, called more is too
simplistic to be of any real use).
I recommend you to spend some time finding your ways in less as it's
able to do nice things like searching (via the / command),
wrapping/cutting long lines etc.

[...]

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] silent install for Git

2012-07-31 Thread Konstantin Khomoutov
On Tue, 31 Jul 2012 09:13:27 -0700 (PDT)
Gabby Romano omerik...@gmail.com wrote:

 Can anyone show me how to create a silent install of Git on Windows 
 Linux ? I didn't find anything I could understand clearly how to
 achieve that.
Stock Git for Windows installer is prepared using the InnoSetup program
and hence should obey the /SILENT and /VERYSILENT command-line options.
Note that this will install Git with default settings.
IIRC, there's currently no way to somehow affect (or preseed) this --
you will need to either hack the installation script according to your
needs and build your own setup package or perform certain post-install
steps (which can be scripted, see [1]).

As to Linux, I don't see how your question applies here.  For a start,
Linux is the name of an OS kernel, not an OS in itself.
And Linux-based usually package Git already so installing it is a
matter of running something like
# apt-get install git
so I fail to see how your question applies for this case.

1. http://groups.google.com/group/msysgit/browse_thread/thread/5133cccd9b82887d/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git push over cntlm

2012-08-02 Thread Konstantin Khomoutov
On Thu, 2 Aug 2012 02:03:34 -0700 (PDT)
MohanR radhakrishnan.mo...@gmail.com wrote:

 Looks like this is the problem. But I got this error through Github
 for Windows which is configured to use cntlm. Clone is fine.
 
 Sending PROXY auth request...
 Host   = github.com:443
 User-Agent = git/1.7.11.msysgit.1
 Proxy-Connection   = keep-alive
 Content-Type   =
 application/x-git-receive-pack-request Accept
 = application/x-git-receive-pack-result
 Proxy-Authorization= NTLM
 TlRMTVNTUAABBbIIogMAAwAsDAAMACBGU1NDSE5EMTE2MDdGU1M=
 Content-Length = 0
 
 Reading PROXY auth response...
 HEAD: HTTP/1.1 407 Proxy Authentication Required ( Access is
 denied.  )

What if you try to access http://github.com:443 from your web-browser
(which is supposed to be able to authenticate OK)?

The problem is that it seems like the authentication phase does happen,
and your request thus might be denied by the access policy of your
corporate HTTP proxy.

Even if you will access the URL OK in your browser, the proxy can deny
your request based on the request's content type, for instance.
It's hard to guess, so I'd ask the system administrators.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push branch

2012-08-05 Thread Konstantin Khomoutov
On Sun, Aug 05, 2012 at 02:00:33AM -0700, THUFIR HAWAT wrote:

 I'm not quite clear on how to branch.  If I'm in the master, commit and 
 push, so that everything is up to date, and then create a branch, how do I 
 push that branch?

$ git push remote thatbranch

will push the branch thatbranch to the remote remote.

 I don't see this scenario described at 
 http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging where 
 the master is up to date and then a branch is created.
 
 Granted, I can checkout that new branch, make a silly change, commit and 
 push that branch, but that seems, well, silly.  What's the better approach?
You seem to think that `git push` can only be called with one argument
(the name of the remote) or without any arguments at all.
In this mode, the behaviour of `git push` is controlled by the
push.default configuration option [1], which currently defaults to
matching [2].  In the matching mode `git push` attempts to push only
those branches which have the same-named branches on the remote
repository.  The end result is that if you create a branch which has a
name not matching any branches in the remote repo, it won't be attempted
to be pushed; you have to do that manually.
If you think about this a bit more, you'll find this quite logical:
the key idea when working with Git is that your local repository is your
very personal playground--you can quickly create branches and get rid of
them without ever needing to hit any remote server.  So when you think
you want to push something to a remote repo, you have to think first and
then push exactly what you want and how you want to do that.

If you think your new branch is going to have a prolonged life in the
remote repo, it's usually a good idea to use the -u command-line
option with an initial `git push` to instantly create a so-called
remote branch in your local repository for that new branch and make
your branch track it.  I mean, if you created a branch named foo and
intend to push it to your origin remote, specifying the -u
command-line option to the `git push` will automatically create a
origin/foo branch for you and set the foo branch to track
origin/foo.  I do understand this sounds complicated, so if you can't
grok it just now, read about remote branches first [3].

In general, you should make yourself familiar with the fact `git push`
is able to perform fine-grained pushes (and even deletion of remote
objects) by crafting an appropriate refspecs for its invocation.
For instance, you can push a branch named foo to a branch named bar
in a remote repo.  Or you can push a tag to a branch, or even a SHA-1
name of a commit to a branch.  You can also update remote tags with
arbitrary objects; you can push the HEAD directly anywhere etc.
Read more on it in [4] and [5].

1. Refer to the `git config` manual page.
2. This will probably change, read up about the new mode, simple,
   and the intent to make it the default, eventually, here:
   https://raw.github.com/git/git/master/Documentation/RelNotes/1.7.11.txt
3. http://git-scm.com/book/en/Git-Branching-Remote-Branches
4. http://git-scm.com/book/en/Git-Internals-The-Refspec
5. http://git-scm.com/ref/git-push

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Recommended way to deploy repo master branch files to gh-pages?

2012-08-05 Thread Konstantin Khomoutov
On Sat, Aug 04, 2012 at 01:29:14PM -0700, TSU wrote:

 Believe these are the steps to at least setup the gh-pages branch using 
 this github instruction page as guidance
 https://help.github.com/articles/creating-project-pages-manua
 
 - Clone the repo locally
 - Create an orphaned gh-pages branch locally
 - Remove the existing files (likely the master branch)
 
 Now,
 The github instructions describe how to create a file called index.html and 
 commit/push the change to github.
 After pushing the file to github, as expected the gh-pages branch is also 
 created remotely.
 I was hoping that it should be possible to simply merge the master branch, 
 ie (while the working branch is gh-pages)
 
 git merge master
 
 But, it isn't working, possibly because the operation is being executed 
 locally and not remotely? If this is the case, is there a remote merge
 
 Am hoping to avoid downloading the master branch, copying elsewhere, then 
 switching to the gh-pages branch, then copying all the master branch files 
 into the local gh-pages branch before uploading which is similar to the FTP 
 workaround (There, you also cannot simply dopy a file, you also have to 
 download and re-upload).

I don't quite follow: you first say you want to create an orphaned
branch (a branch with no history) and then you say you want to merge
master into it (bring a particular line of history into a branch).
If you want to take certain file from the master branch into your
gh-pages branch, then why not just fork gh-pages off master and
then remove unneeded files and commit?
Or the whole issue is that for some reason you don't have the master
branch locally and want to save bandwidth by not fetching its whole
history?  Then try something like

$ git checkout --orphan gh-pages
$ git rm -rf .
$ git fetch --depth=1 github master:temp
$ git checkout temp -- index.html foo.mkd bar.mkd ...
$ git add .  git commit ...
$ git branch -D temp

That way you do only a minimal (shallow) fetch of the master branch.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Recommended way to deploy repo master branch files to gh-pages?

2012-08-06 Thread Konstantin Khomoutov
On Sun, 5 Aug 2012 17:18:30 -0700 (PDT)
TSU tonysu...@gmail.com wrote:

[...]
 The second reason you gave is my objective, am looking to perform a
 remote copy operation from one branch (master) to another
 (gh-pages), and try to execute that without downloading to the
 client, so as to avoid unnecessary downloading to the client if not
 needed.
This is not really possible with Git client *solely,* because remote
repositories are not at all special to Git (which is a DVCS system).
AFAIK Git can only fetch history from a remote or push history to a
remote (also delete named references there, as a special case--by
pushing nothing to them).

There *is* a way to perform true remote copy iff you have a shell
access on the remote machine (well, this is obvious, but I think some
people underestimate what SSH can do for them).  But this is not the
case for github and other specialized Git hosting solutions, which use
virtualized users and lock down as much as possible.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] fast-import error: fatal: 'refs/heads/master' - not a valid ref

2012-08-07 Thread Konstantin Khomoutov
On Tue, Aug 07, 2012 at 01:24:31PM -0700, Andrey Pavlenko wrote:

 I'm developing a remote helper which uses the fast-import stream for 
 fetching. When I perform cloning git prints error message - fatal: 
 'refs/heads/master' - not a valid ref, however the clonning completes 
 normally. Each my fast-import commit command starts with 
 commit refs/heads/master header.
 
 What does this error message mean and how can I fix it?

Please address this question to the developers' Git list instead,
which is git at vger.kernel.org.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git clone fails with unable to overwrite old ref-pack file

2012-08-08 Thread Konstantin Khomoutov
On Tue, 7 Aug 2012 18:24:48 -0700 (PDT)
Lisa Zorn lisa.z...@sfcta.org wrote:

(CC'ing the msysgit mailing list, I suspect the discussion does really
belong there, so possibly please cull git-users from the CC list when
replying.)

 I have been using git for years and have not run into this problem
 before. I tried to git clone a repo that's on a local drive, and I
 get this error: dir1\dir2git clone -b master Y:\git_src
 Cloning into 'Muni_GenevaBRT_HuntersPtToCandlestickInterchangeOnly'...
 done.
 fatal: unable to overwrite old ref-pack file: Permission denied
 fatal: The remote end hung up unexpectedly
 
 However, when I run it in another directory (not a subdir of dir1),
 it works fine.  But it's repeatable; if I run it from dir1\dirX it
 happens again.
 I am using the stable version of git, and I'm on windows.  What's
 going on with the old ref-pack file?

Are you sure that the combination of dir1\dir2 and that Muni_...
thing does not exceed the limit of 260 or so characters?

This has been discussed recently: [1], [2].

I would try to debug this situation by monitoring which files are acce
ssed by Git tools using Process Monitor [3] (ex. FileMon) -- you could
filter its output by failed attempts to create/open files.

1. https://github.com/msysgit/msysgit/issues/52
2. http://thread.gmane.org/gmane.comp.version-control.msysgit/14572
3. http://technet.microsoft.com/en-us/sysinternals/bb896645

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git clone all branches

2012-08-09 Thread Konstantin Khomoutov
On Wed, 8 Aug 2012 20:45:51 -0700 (PDT)
THUFIR HAWAT hawat.thu...@gmail.com wrote:

 There's no syntax for cloning all branches for a repo?
 
 How do you at least clone multiple branches?  I tried:
[...]
 and a few variants, I can't find the syntax in git help clone
As you have been already told, you should make yourself comfortable
with the concept of remote branches and their interaction with your
local branches.  Read [1] for this--you will learn that cloning a
repository actually brings all the remote branches in, just they are,
well, remote, and so `git branch` without the -a command line option
does not show them, and that creation of a local branch master which
tracks the same-named remote branch is just a convenience implemented
by `git clone` (which just adds to the consusion).

I can understand your complication with this subject (everyone with a
centralized SCM background seem to have this syndrom for some time).

To help yourself absorb the ideas begind managing branches in
distributed SCMs, you should get under your skin that your remote
github repo is not really somehow special.  You could have a dozen of
remote repositories tracked by your local repository; they all could
have same-named branches, that's why the concept of remote branches
come into play: they're properly *namespaced* (contain the name of the
remote they came from) and Git will prevent you from changing them.

All your development happens on your *local* branches, which you
create at will, possibly basing them on certain remote branches.

1. http://git-scm.com/book/en/Git-Branching-Remote-Branches

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] permissions denied - git cant find the sshkey

2012-08-13 Thread Konstantin Khomoutov
On Sun, 12 Aug 2012 06:22:38 -0700 (PDT)
the5kyliner s...@stageclear.de wrote:

 Hey guys,
 finally installed git on my linux server.
 I configured the ssh keys, but I want to connect with a windows
 computer to the server now, and the server doesnt seem to find my ssh
 key.
 
 I put it on my D drive somewhere and now, if I want to copy my
 repository via git, it asks for a password for gitosis.
 I think he wants so check the ssh key now, but how can I tell the
 server, that my key is in D:\...\ ?

Keys in SSH have two parts: private and public.  When you generate an
SSH key, you transfer its public part to the server you want to
authenticate against, and add it to the list of authorized keys
(~/.ssh/autorized_keys) of the user you want to authenticate as.
After that, when you try to authenticate at that server using your
private key, the authentication protocols uses both parts of the key to
verify your authenticity.

In the case of gitosis, the matter is a bit more complicated: since the
chief reason gitosis exists is to virtualize the Git-only users (that
is, to not burden the server's administrator with creating a dedicated
system account for anyone just wanting to access Git repos on that
server), gitosis uses just one system account, and then distinguishes
its virtualized userd by their public keys.

Now let's consider one other aspect of how SSH works.

First, note that it's customary to have one's private key encrypted
using a password: this ensures that when a key is lost (stolen, for
example), it requires more work for the attacker to actually misuse it
as they now need to decrypt the key first.  Having one's key encrypted
naturally means SSH client asks for the password when it tries to load
the key.  Exactly how it looks, depends on how your system is set up:
if you're using an SSH key agent, the password is asked once per
session, otherwise it's asked each time the key is needed.

Second, SSH supports several authentication mechanisms, and
public-key-based authentication is just one of them.  Another very
popular one (and usually enabled by default on SSH servers) is
password-based, called keyboard-interactive by SSH.
When SSH client and server settle on using the keyboard-interactive
authentication method at the handshake time, you are also prompted for
the password.

By now, you should see that it's not enough for us to know you're
seeing a password prompt--please be more specific about what exactly
you're seeing.

The next thing you should understand by now is that the server is not
involved in finding your key--if you properly submitted the public
part of your key to gitosis, you then need to make sure your SSH
*client* is able to find and use the private part of your key.
And this one heavily depends on your setup: unfortunately, with Git for
Windows, there are (at least) two ways to use SSH client: 1) the
ssh.exe binary from OpenSSH, bundled with Git for Windows; 2) the
plink.exe binary from PuTTY [1] (not included with Git for Windows).
Hence, to help you debug this, we have to know your setup, of which you
provided almost zero details.

If we assume you're using built-in SSH client (it's true if you did not
do anything to install/enable PuTTY), your private key is expected to
be under your ~/.ssh folder, and it should be named id_rsa.
Translating this to Windows, the file should be
C:\Users\YOU\.ssh\id_rsa
where YOU is your username.

This assumes, the SSH key has been generated by the ssh-keygen tool
from the OpenSSH distribution.  You also did not tell us how you
generated your key, so I have to guess here.

1. http://www.chiark.greenend.org.uk/~sgtatham/putty/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Full Backup - Best Practice

2012-08-17 Thread Konstantin Khomoutov
On Fri, 17 Aug 2012 01:52:54 -0700 (PDT)
Michal Idziorek idzio...@gmail.com wrote:

 What would be the most elegant way to fully backup a bare git
 repository. 
 
 Would the following approach work fine?
 
 tar -cf repository.tar repository/
 
 I wonder what happens if the repository is accessed during the backup?
Bad things happen: a Git repository is a collection of files, so any
transation semantics are implemented using some sort of policy *by the
Git tools* (supposedly through the usage of lock files).
Hence the only sure way to back up a Git repository which is
online (can be accessed by Git clients for pushing any time) is to
use Git tools.

In my shop, we back up each Git repo on the main server to its mirror
bare repository on another box using a call to `git fetch`:

git fetch --quiet --prune repo '+refs/*:refs/*'

which essentially means bring everything the remote has, update
matching local things (overwrite, if necessary), then delete everything
the remote does not have anymore.

(In fact, the solution is more involved: we host our repos using
gitolite, and the backup script first fetches the list of repos it has
the read permissions for (nice feature of gitolite), then fetches from
each readable repo, initializing an appropriate local bare repo first,
if the remote repo is seen for the first time.)

Obviously, this backs the repositories up using another host and a
local network.  If you want to back up locally, there are at least two
solutions involving Git tools:
1) You can do the same fetching shown above, just using
   /path/to/the/repo or file:///path/to/the/repo
   URLs to specify the repository to back up.
2) Use `git bundle` which is essentially just a much smarter `tar -cf`
   with an added bonus that Git tools consider a bundle as a
   self-contained repository.

Yet another approach might be to just reverse the logic and move to
push approach for backups rather than pull: for instance, recent
versions of gitolite grown built-in mirroring support [1].  

1. http://sitaramc.github.com/gitolite/mirroring.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Full Backup - Best Practice

2012-08-17 Thread Konstantin Khomoutov
On Fri, 17 Aug 2012 13:20:17 +0100
Adam Prescott a...@aprescott.com wrote:

  In my shop, we back up each Git repo on the main server to its
  mirror bare repository on another box using a call to `git fetch`:
 
  git fetch --quiet --prune repo '+refs/*:refs/*'
 
  which essentially means bring everything the remote has, update
  matching local things (overwrite, if necessary), then delete
  everything the remote does not have anymore.
 
 Aren't you just recreating `git clone --mirror`? If I remember, it
 will automatically prune any deleted refs on the next fetch.
Quite probably.  The problem with `git clone` is that it's supposed to
create a repository, but we keep the mirror repositories around
(I mean, they are not tarred and gzipped, and just sit there waiting
for the next backup round or for being used for disaster recovery).

The upside of this approach is that it minimizes transfers because they
become differential, and this allows to backup often, without worrying
too much about load spikes on the server and the network.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Warning: you are leaving 30 commits behind, not connected to any of your branches:

2012-08-17 Thread Konstantin Khomoutov
On Fri, 17 Aug 2012 06:35:24 -0700 (PDT)
Fred fredgarlo...@googlemail.com wrote:

 I've cloned a fresh repo with submodules and then cd library/module
  git checkout master
 
 it gives me a warning and I don't understand why and how to avoid it? 
 
 Warning: you are leaving 30 commits behind, not connected to
 any of your branches:
 
   2553655 Merge branch 'master' into prod
   6b07300 Fix build
  ... and 28 more.
 
 If you want to keep them by creating a new branch, this may be a good
 time to do so with:
 
  git branch new_branch_name 654646464
 
 Branch master set up to track remote branch master from origin.
 Switched to a new branch 'master'
 
 
 What is going wrong here? How did we managed to have commits not
 connected to any of branches?

Did you read [1]?  I'm not familiar with submodules, but the cited text
hints that the state of each sumbodule is checked out using that
specific commit's SHA-1 name, and so each submodule normally is in the
detached HEAD state.  Hence, if the master branch of that particular
sumbodule references a commit which is not equal to that specific
commit checked out in the submodule, when you check out that master
branch, you do really move that submodule's HEAD pointer and get that
warning.

I think reading through the whole chapter on submodules is a worthwile
thing.

1. http://git-scm.com/book/en/Git-Tools-Submodules#Issues-with-Submodules

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Full Backup - Best Practice

2012-08-17 Thread Konstantin Khomoutov
On Fri, 17 Aug 2012 14:47:07 +0100
Adam Prescott a...@aprescott.com wrote:

  Quite probably.  The problem with `git clone` is that it's supposed
  to create a repository, but we keep the mirror repositories around
  (I mean, they are not tarred and gzipped, and just sit there waiting
  for the next backup round or for being used for disaster recovery).
 If you create your repository with `clone --mirror`, a simple `fetch`
 should be all you need to keep a backup, unless I'm missing something.
Good idea indeed.
But I still prefer my approach as the full information about how to
update a mirror repo is contained in the backup script itself.
Each mirror repo thus has almost no identity (besides the fact it
mirrors a specific repo), which, I think, is a good thing.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Git Font in the Logo

2012-08-21 Thread Konstantin Khomoutov
On Tue, 21 Aug 2012 10:51:16 +0200
Maciej Kołek kont...@ferus.info wrote:

 Maybe this is the wrong place to ask this question - but i would like
 to know the Git Font, that is in the logo.
 I want to make a Git cheat sheet mug, with the text written in Polish:
 
 Git jest Git and all i need is the jest text made out of git font.
 Git in common polish language means cool, super, awesome.
 So the translation is quite like: Git is awesome.

According to [1], the new Git logo was designed by Jason Long, who
seems to be available as [2] (this also has twitter link), [3] etc.
So I'd just try to reach that person by e-mail and ask.
It might turn out that there's no specific font and the logo text has
been sketched right away, but possibly you could then convince Jason to
create several pictures specifically for usage on mugs. ;-)

1. https://github.com/blog/1125-new-git-homepage
2. http://dribbble.com/jasonlong
3. https://github.com/jasonlong

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] misleading diff hunk-header

2012-08-21 Thread Konstantin Khomoutov
On Mon, 20 Aug 2012 20:49:48 -0500
Tim Chase g...@tim.thechases.com wrote:

 tl;dr version: diff.{type}.xfuncname starts searching backwards in
 from the beginning of the hunk, not the first differing line.
[...]

This list is for helping inexperienced Git user master Git itself.
Please report any bugs to the main (devel) Git list which is
git at vger.kernel.org

(More info is at http://vger.kernel.org/vger-lists.html#git)

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Git Http Error

2012-08-21 Thread Konstantin Khomoutov
On Tue, 21 Aug 2012 16:27:48 +0400
Konstantin Khomoutov flatw...@users.sourceforge.net wrote:

[...]
 HTTP status code 401 means not authorised [1] which (supposedly)
 means that while the web server was able to successfully verify your
 identity, the type of access performed by the Git client when fetching
 has been denied for you by certain web server settings.  Also web
 server could have denied your from accessing specific filesystem path
 etc.

Well, [1] even states that 401 is returned the first time a client
request access to a resource requiring authentication.
I'm not sure what exactly follows from this observation, just trying to
make things more clear.

[...]
 1. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Git Http Error

2012-08-22 Thread Konstantin Khomoutov
On Tue, 21 Aug 2012 16:37:09 -0700 (PDT)
Mavin Martin mavinmar...@gmail.com wrote:

[...]
 This might fix the issue, the only thing is that it still prompts for
 a username and password. Do you know much about .netrc?
[...]
 When I do a git clone, it still asks for a username and password on
 my Mac Client.  Am I setting it up correctly?

Git client uses libcurl to implement its HTTP[S] transports, so read the
section titled NETRC in the cURL manual [1] to learn the correct
format.

Note that you might consider using transports different from HTTP[S]
for your repositories, for example, the ubiquitous SSH.  Googling
suggests that macs support SSH key agent, so using SSH transport is
easy.

1. http://curl.haxx.se/docs/manual.html
2. https://www.google.com/search?q=mac+ssh+key+agent

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] daemon

2012-08-22 Thread Konstantin Khomoutov
On Wed, 22 Aug 2012 18:35:43 +0200
Tomasz Prus to.p...@gmail.com wrote:

 Can You recomend any extendable Git SSH deamon (open source) for use
 in production eg. in Java, Erlang..? I mean to implement own
 authorization rules etc.
It's not clear what do you really mean by authorization rules while
telling specifically about SSH replacement because SSH is about
authentication (and transport), not authorization.
Making a guess, I suggest you to look at gitolite [1]: it works behind
a regular SSH daemon and provides for repository management,
virtualized Git users (distinguished based on the public parts of their
SSH keys) and fine-grained access control to the repositories
(supposedly that's what you want).

1. http://sitaramc.github.com/gitolite/master-toc.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Looking for explanation why GIT configurations were lost when Partition modified

2012-08-26 Thread Konstantin Khomoutov
On Sat, Aug 25, 2012 at 05:25:03PM -0700, TSU wrote:

 Was surprised,
 When I re-sized and modified the partition at the disk block level (using 
 gparted) where my GIT client folders were located, none of my directories  
 configured as mirrors of repos on Github retained their configurations.
 
 I would have thought that the git repo information about each directory 
 should be stored at the Filesystem or higher level, either as file 
 attributes or as configuration files, but if that were the case I highly 
 doubt that the partition modifications I did should have affected git 
 configurations.
 
 Resolution for re-creating git configs should be simple, I'll just remove 
 existing local copies, then start over by cloning and/or initializing new 
 local repos and doing a fetch or pull.
 
 But, am still curious why my git configurations didn't survive, where are 
 configurations kept that they might be vulnerable?

Git configuration are stored in plain text files, in these three places:
* The system configuration (usually, /etc/gitconfig);
* The global configuraion (usually, ~/.gitconfig);
* The per-repo configuration, repo/.git/config

So I would say the breakage you observed was caused by some other reason
than partition resizing.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] key authentication error

2012-08-29 Thread Konstantin Khomoutov
On Wed, 29 Aug 2012 04:30:45 -0700 (PDT)
ashu ashutove...@gmail.com wrote:

 *Any one can tell me reason of  this error :
 
 **[root@localhost git1]# git push -u origin master
 Permission denied (publickey).
 fatal: The remote end hung up unexpectedly
 
 
 whereas I have the result of the key verification command is follow :
 
 [root@localhost git1]# ssh -vT g...@github.com
[...]
 reply 0 Hi ashutoshverma! You've successfully authenticated, but
[...]

What's the push URL for your origin remote?
Does it really contain g...@github.com in it?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Konstantin Khomoutov
On Wed, 29 Aug 2012 04:15:57 -0500
Ryan Hodson hodson.r...@gmail.com wrote:

 I believe the 403 error is a GitHub permissions issue. I don't think
 you can push over https without some special setup. The easy solution
 is to use SSH instead.
[...]

I beleive there's no any way to push over HTTPS to github.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Konstantin Khomoutov
On Wed, 29 Aug 2012 01:43:22 -0700 (PDT)
ashu ashutove...@gmail.com wrote:

 What can be the reason of this error ?
 
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
 [sudo] password for ashu: 
 Initialized empty Git repository
 in /home/ashu/Documents/git-dir/git1/.git/
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first
 commit fatal: Unable to create
 '/home/ashu/Documents/git-dir/git1/.git/index.lock': Permission
 denied ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit
 -m first commit
The reason is that for some totally unknown reason you first create
your repository as root (and files created in the git's metadata
directory, named .git, get root:root as its owner/group and
appropriate permissions) and then you're trying to manipulate files in
this directory (`git commit`, in the end, does exactly this) using your
normal user credentials.

There's no sense to initialize *your personal* Git repository as root.
Note that there are really not many things to do on your machine you
need root privileges for; mainly they are limited to package management,
editing system configuration files and (re)starting daemons.

[...]

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git branching

2012-08-29 Thread Konstantin Khomoutov
On Tue, 28 Aug 2012 12:44:19 -0700 (PDT)
git newbie technewbi...@gmail.com wrote:

 For a more complicated development environment where there is a
 master branch, a devel branch off of master, and feature branches off
 of devel, how do you create a feature branch so that it's parent is
 the devel branch and not the master branch?

It's recommended to read [1].  It's not to be followed as a dogma, but
it has good explanations of concepts (with pictures) and it lists the
relevant Git commands (including those which you have been already
advised to use in this thread).

1. http://nvie.com/posts/a-successful-git-branching-model/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] .gitignore and branches issues

2012-09-03 Thread Konstantin Khomoutov
On Mon, 3 Sep 2012 02:29:12 -0700 (PDT)
mem talofo.l...@gmail.com wrote:

 While checkout to master branch, I got:
 
 Error: The following untracked working tree files would be
 overwritten by checkout:
 nbproject/private/config.properties
 nbproject/private/private.properties
 nbproject/private/private.xml
 nbproject/project.properties
 nbproject/project.xml 
[...]
 dev is ignoring those files. master isn't, because no .gitignore file
 is present there. Perhaps, when I was setting branches, I forgot it
 somehow...
 
 They should both ignore those files.
 
 Plus, when I push this to remote repos, those changes should be
 propagated for those remote repos as well. (I'm using a bare repo).

Since .gitignore is a part of the repository snapshot forming a commit,
it will be propagated when people check out that state.

 My question is:
 
 *How can we add that .gitignore file to the master, so that this
 doesn't happen again ?*

I'm a bit confused because the straightforward answer seems to be a
bit too easy to be serious: just check out the `master' branch,
add .gitignore file and commit or, alternatively, cherry-pick the
necessary commit(s) which dealt with .gitignore from your dev branch.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Automatic repacking when cloning

2012-09-03 Thread Konstantin Khomoutov
On Mon, 3 Sep 2012 10:51:30 -0700 (PDT)
Haasip Satang haasip.sat...@googlemail.com wrote:

 I'm having a question regarding the packs and the repacking of those
 during cloning. 
[...]
 On this big repo I created various subtree branches so I can clone
 some of the folders individually (without getting the whole big
 thing). The problem is, however, that all my subtree clones seem to
 get a copy of the big 120MB pack, only to then extract 2MB from it. 
[...]
 - Any idea how this could be achieved using ssh or git protocol (as 
 obviously I'd prefer to use those over file:// )?
 
 - Is that as designed or could it be a bug in git? 

Try to asking this question on the main (devel) Git list instead,
(which is git at vger.kernel.org) as this list is for helping newbie
Git users rather than for solving hardcore technical issues.

See http://vger.kernel.org/vger-lists.html#git for more info.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] rejected - non-fast-forward

2012-09-04 Thread Konstantin Khomoutov
On Tue, Sep 04, 2012 at 12:27:00PM -0700, Adriano Schmidt wrote:

 I'm using e-git (git plugin in eclipse).
 
 when I push happens this error:
 
 rejected - non-fast-forward
 
 What can I do?

You should read The Book:
http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Private-Small-Team

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Help! Unable to retrieve my stashed files!

2012-09-04 Thread Konstantin Khomoutov
On Tue, Sep 04, 2012 at 01:22:47PM -0700, kramer.newsreader wrote:

 First, let me preface this post by saying that yes I am new to git and that 
 it has by far the steepest learning curve of any source control system I 
 have used.

I think you could have omitted this remark without any loss for your
question, really.

 My question is a two parter.
 
 1) I am working in a slightly different environment than my colleagues and 
 need changes to the source in order to build.  Yes, there are probably ways 
 to refactor our code to alleviate this problem at least somewhat, but I am 
 the new guy and that's political (don't get me started).  Anyway, I would 
 like to set up some sort of SANE system such that whenever I fetch, I can 
 apply my changes without adding them to the change list so as NOT to commit 
 them.

This situation calls for using rebase.  More on this below, after
dealing with the problem at hand.

 2) I thought I could use git stash for this, so I did this:
 
 git stash --include-untracked
 
 and when I do
 
 git stash show
 
 it shows this:
 
 backend/infinispan-rar/pom.xml |   12 ++--
 backend/pom.xml|   13 +++--
 backend/test/pom.xml   |3 +--
 .../main/resources/com/mojiva/testDbContext.xml|6 +++---
 data/mojiva.xml|2 +-
 dbmigration/pom.xml|   16 ++--
 .../main/resources/db/changelogs/issue-17544.xml   |4 ++--
 pom.xml|   11 +++

Apparently, `git stash show` does not show the differences (wholly
added files) which would be introduced by the included untracked files.
I'm not sure about this (never used `git stash` with untracked files
myself) but possibly this is an interesting topic to bring on the main
Git list.

From what I see with my version of Git (1.7.10), if you tell `git stash`
to include untracked files, the commit representing the stashed state
has three parent commits (as opposed to just two, as usually), and that
extra commit contains all the untracked files.  Supposedly this is a
part of explanation of why these files are not shown.

If you want to see, graphically, how your stash looks, either run

$ gitk --all
or
$ git log --all --graph --decorate --oneline

and you will see a commit, which is one of the stash commit's parents,
titled something like untracked files on branchname 
You can notice its SHA-1 name and call, say, `git show` on it to see
your untracked files.

 but when I try to retrieve them, it doesn't work:
 
 backend/activator/effective.pom already exists, no checkout
[...]
 run/linksDB.script already exists, no checkout
 Could not restore untracked files from stash

Clearly, the files listed do really exist in your checkout (Git work
tree).  If Git were to replace them, you could have lost valuable data.
One straightforward solution seems to be pretty obvious: move the files
listed so some safe place and then retry `git stash apply` -- it should
complete OK (modulo possible conflicts when applying the changes in
tracked files).

You can also directly get the contents of any untracked file recorded
in your stash by referring to that special commit holding them I
described above.  Either dig that commit's SHA-1 name and use it, or
just refer to it by its symbolic name -- since it's the third parent of
the topmost stash, it can be referred to as stash@{0}^3 and hence to get
the contents of the backend/activator/effective.pom file you could run

$ git show stash@{0}^3:backend/activator/effective.pom

 I really need these files back and stash won't give them back!

`git stash` is just being cautious about your own data.
I hope I managed to explain how to resolve your problem.

Now let's discuss that rebase thing I mentioned earlier.

While there's nothing wrong with stashing, your use case seems to be a
subject for rebasing workflow.  The basic idea is this:
1) You start with a clean state of the branch you're working on,
   without applying your specific local changes.
   Then you fork a local branch off it.
2) You check out that branch and add all your local changes (including
   those extra files which are untracked by now).
   You can do a single commit or a series of commits, this does not
   matter.
   Now this local branch contains all the history of its base branch
   plus one or more commits representing your local changes.

Now, instead of `git pull` you do `git pull --rebase` and after

$ git fetch

instead of

$ git merge --ff origin/base

you do

$ git rebase origin/base

Basically, rebasing this way will make sure your local branch always
contains the history of its base branch + those local commits on top.

A somewhat tricky part comes when you need to make changes to a file you
have tweaked locally *and* you need to send these changes upstream.
In this case you record these changes normally -- 

Re: [git-users] Problems with Git install on Windows 7

2012-09-08 Thread Konstantin Khomoutov
On Fri, 7 Sep 2012 14:22:05 -0700 (PDT)
Jim Kadin nida...@gmail.com wrote:

 I downloaded and installed 1.7.11 from
 http://git-scm.com/download/win last week. (actually I've done it
 twice).
 
 I'm having several problems that seems like my install is missing
 something.
[...]

The technical questions about Git for Windows should be posted to the
msysgit mailing list (here on google gropus as well) [1] or directed
to that project's issue tracker [2].

1. http://groups.google.com/group/msysgit/
2. https://github.com/msysgit/git/issues/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Include empty folders

2012-09-08 Thread Konstantin Khomoutov
On Sat, 8 Sep 2012 08:38:21 -0700 (PDT)
Mindcast Mindcast i...@mindcast.gr wrote:

 is there any way to include empty folders when i git commit without
 adding a file (like .gitignore or .gitkeep) ?
 
 As long as i know there is no official way to do this.
Impossible [1].

 But, is this something it can be implemented maybe in a future
 version ?
Unlikely.  The original design decision (and hence the official
stance of the core Git developers) is that Git tracks content,
not files.  Hence it does not even really track files (I mean,
Git does not put special sense into the names of the files it
tracks, which is in stark contrast to, say, Subversion) but
rather the contents of those files -- for instance, the fact
the file has been renamed in a commit is not recorded in that
commit in any way (`git mv` is just a convenience command,
it does nothing really special).  Looks like tracking empty
directories would mean actually paying attention to their names --
something Git does not do by design.

Note that messing with placeholder files is not the only way
to maintain empty directories: some people think this is better
implemented as a part of the project's build framework.

1. https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Looking for a reccommendation of a GUI git interface for Windows

2012-09-11 Thread Konstantin Khomoutov
On Tue, 11 Sep 2012 01:25:36 -0700 (PDT)
Lars Pensjö lars.pen...@gmail.com wrote:

 You are missing my favorite, msysgit ( http://msysgit.github.com/ ).

Well, I thought installing Git for Windows, which you called msysgit,
is taken for granted and the question was more about slightly more
user-friendly solutions. ;-)

But yes, you're correct recommending it: having vanilla (or call it
reference or whatever) Git install is a must in my opinion as certain
complicated situations are better handled by dropping into a shell with
the sharp tools handy.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] use GIT with web portal

2012-09-11 Thread Konstantin Khomoutov
On Tue, 11 Sep 2012 01:57:46 -0700 (PDT)
ansh anshulksharm...@gmail.com wrote:

 hi all
 i wanted to know whether GIT can be used by my web Portal.
 
 my requirement is to save a file in 3 revision history from webpage
 on ubuntu.

I don't think I managed to fully parse this.
Do you want to implement some sort of backing store for the files
uploaded by the users of your web portal, so that for each file,
several past revisions of its content can be kept along with its
present content?

Then the answer is yes; there are even wiki engines (gitit, ikiwiki)
which use Git to store the sources of their pages, including
attachments (uploaded files).

On the other hand, to just store several revisions of a certain uploaded
file (I'm really confused about that digit 3 near the word revision
in your question--do you mean you want to keep at most three
revisions?), using a full-blown SCM system might be like using a
microscope to hit a nail.  For such a case, I would probably go for
using rdiff [1] to keep deltas of several past revisions of each file
(in a database) and keeping the most recent version of each file on
disk, readily available.  Using rdiff-backup [2] (on a local file
system) might also be an option.

If you still think an SCM is a way to go, I'd probably look at Fossil
[3] instead as it might be easier to deploy (just one executable file
with two dependences: on libc and libz).  Fossil uses SQLite for
storage internally (so the whole repository is just a single SQLite v3
file) and does compress the blobs it stores.

1. http://linux.die.net/man/1/rdiff
2. http://www.nongnu.org/rdiff-backup/
3. http://www.fossil-scm.org

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] trying to config git trouble with adduser

2012-09-13 Thread Konstantin Khomoutov
On Thu, 13 Sep 2012 02:51:26 -0700 (PDT)
maxhodges m...@whiterabbitpress.com wrote:

 When I enter sudo adduser git 
 i get radd git sudo: useradd: command not found 
  when I enter whereis adduser I get /usr/sbin/adduser but I can't
 switch to it  root@431901-web1 [/usr/sbin]$ cd adduser bash: cd:
 adduser: Not a directory when I do a ls I see it has an @ after it
 adduser@ what does the @ mean? is there any workaround? I have root
 access, but I'm not a pro unix guy... 
Well, adduser is a debianism so you're supposedly running Debian or one
of its flavors such us Ubuntu.

adduser is a program, so the result of `whereis adduser` is the full
path to a *file*; obviously, attempt to cd to a file tells you it's not
a directory.

Next, useradd is located in the passwd package, observe:
% dpkg -S /usr/sbin/useradd
passwd: /usr/sbin/useradd

Note that this package has the required priority, so if you really miss
the useradd program, your system appears to be seriously hosed.

Try # apt-get install --reinstall passwd adduser

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: trying to config git trouble with adduser

2012-09-13 Thread Konstantin Khomoutov
On Thu, 13 Sep 2012 03:46:34 -0700 (PDT)
maxhodges m...@whiterabbitpress.com wrote:

 nevermind. I give up on installing Git. 
I wonder why you have any complications with it at all.
Installing Git is a matter of telling
# apt-get install git
That's all I need to do to get a working Git on my system.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: trying to config git trouble with adduser

2012-09-13 Thread Konstantin Khomoutov
On Thu, 13 Sep 2012 04:38:39 -0700 (PDT)
maxhodges m...@whiterabbitpress.com wrote:

 I finally got it installed after spending hours of web research. This
 is the command I had to use:
 
 $ rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
 
 $ yum install --disableexcludes=main --enablerepo=webtatic git-all 

Well, the first hit I got googling for git+centos+5 is
http://www.davegardner.me.uk/blog/2010/01/29/setting-up-git-on-centos-5-server/
which tells there's a repo containing ready-made Git packages.
I do not use CentOS so can't verify this but that guide I linked to
does not appear to be complex to me.

 But then I get stuck on the next set of instructions:
 
 http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server
 
 first, $ sudo adduser git
 results in:  sudo: useradd: command not found
 
 someone on stackoverflow suggested I run this instead:
 $sudo /usr/sbin/useradd git
 
 that seemed to work, too bad it wasn't in the documentation.
What documentation?  You referred to a book; a book is a text *broadly*
covering its subject, it's not an Installing Git on CentOS 5 HOWTO
document.

In either case, adding (system) users on a Unix system is a basic
sysadmin skill, something a sysadmin learns to do in the first few
hours of their training.  I dunno why you are blindly following
the letter of someone's blog post or a random book on the subject
instead of getting the essense of them and applying it in a way which
is best for your particular system.

 Next it says, Next, you need to add some developer SSH public keys
 to the authorized_keys file for that user. Let’s assume you’ve
 received a few keys by e-mail and saved them to temporary files.:
 
 Unfortunately I haven't received any by email. (??) I'm trying to set
 this up but this is a deadend for me.
The text you cited clearly reads Let's assume ..., and it merely
means that the text's author decided to not delve into the topic of
generation of SSH keys and instead they assumed the
prospective developers generate their SSH keys for themselves on their
own machines and send you (the Git administrator) the public parts of
those keys.  Your particular organisation might have other policy for
this, for instance, *you* generate keys for the developers and then
hand them out to those developers while keeping the public parts of
these keys to yourself.  Or you might decide to not use SSH for
accessing your Git repositories and instead serve them over HTTP[S]
using whatever HTTP authentication scheme you decide (including, say,
Negotiate which supports Kerberos/SSPI and enables SSO in Windows
domains).

 Over the years I've installed
 many complex web apps including Magento eCommerce, X-Cart, Kayako
 helpdesk, Xenforo and other forum systems, WordPress, and many other
 apps. Why can't installing Git be as easy as any of those? Keep in
 mind, Git can be used for documents and design files, not just for
 the source code of UNIX developers. Unlike many other web apps, it
 seems you have to be a very experienced UNIX sysadmin in order to get
 this software installed. 

Sorry but it looks like you're trying to install Git having no clean
goals of what you really want to achieve.  This is not gonna work this
way because it never works this way.  Git is not a webapp which has
precisely one use (to be a webapp), it's a flexible tool which, when
being deployed on a server, requires up-front thinking about what kind
of setup you intend to get as the result: which protocols to use for
accessing the repositories, how to manage users and their access
permissions.  And if you for example decide to use SSH for accessing
Git repos, it's obviously supposed you have to possess basic to
intermediate level of knowledge of SSH, including what are SSH keys and
how pubkey-based authentication works in SSH.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] How to uninstall Git on Centos 6.x

2012-09-13 Thread Konstantin Khomoutov
On Wed, Sep 12, 2012 at 06:49:31PM -0700, Bryce Verdier wrote:

 If you still have the source directory around you should be able to cd into
 that directory and run make clean.
Wrong.  `make clean` is about deleting compiled object files, binaries
and other generated stuff; deleting from the source directory, that is.
If a makefile implements a target which balances `make install`, it's
called uninstall, so one could try running `make uninstall`.

 Not sure if git has this, but most makefiles do so I'm suggesting it did
 first. Let us know what happens.

In either case, installing from source should be the last resort.
If there's no way to create a package, at least a tool like checkinstall
should be used to generate a poor man's package out of `make install`
invocation, so that its results could be then reverted.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Changed but not updated and Changes not staged for commit

2012-09-17 Thread Konstantin Khomoutov
On Mon, 17 Sep 2012 00:23:40 -0700 (PDT)
Ivan Ionut ivan.ion...@gmail.com wrote:

[...]
  Well after i modified a file... after git status:
 
  # 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:   file2
  #
 
  I need to understand why it didn't show:
 
  # Changed but not updated:
  #   (use git add file... to update what will be committed)
  #
  #   modified:   file2
  #
[...]
 And how to do it like in the book?

That's simply a textual change in how `git status` formulates the
situation you're talking about -- a bit of history diving brings this:

% git log -F -S 'staged for commit' -- wt-status.c
commit 8009d83c7e7af0a298ef858609a8201d01086396
Author: Matthieu Moy matthieu@imag.fr
Date:   Tue Nov 2 16:31:19 2010 +0100

Better Changed but not updated message in git-status

Older Gits talked about updating a file to add its content to the
index, but this terminology is confusing for new users. to stage
is far more intuitive and already used in e.g. the git stage command
name.

Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Junio C Hamano gits...@pobox.com

% git name-rev 8009d83c7
8009d83c7 tags/v1.7.4-rc0~122^2~9

So the change appeared in Git v1.7.4.
Supposedly the examples in the book you're reading were recorded
using a version of Git older than 1.7.4.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Is there a method to rebuild completely the repositoty ?

2012-09-19 Thread Konstantin Khomoutov
On Wed, 19 Sep 2012 02:05:35 -0700 (PDT)
lalebarde l.aleba...@free.fr wrote:

 I use Git *smudge/clean* in a border line way that do not respect the
 Git recommendations : *When you design these filters, they should be
 able to fail gracefully and have the project still work properly.*
 
 As I change my filters, I wonder if there is a simple method to
 *rebuild completely the repositoty*, in order to have a new one as it
 would have been if this new filter was used from the start - except
 of course the sha1 digests ? I know this is a bad idea, but with some
 care, managing it is possible with suspending the write access to the
 remote for all users but the admin before, notifying all users to
 rebuild, and hook the push with the test of a dummy file that tags
 the filter bersion in order that nobody can push with the old filter.
 
 I don't want to have to maintain different versions of the filter and
 to embed a version identifier in the smudge filter - only this few
 bytes tag file.
 
 By rebuild I mean :
 
 for each commit {
   smudge each file with the old filter to the workspace or any 
 temporary area
  clean it with the new filter back to the repository
 }

`git filter-branch` [1] is what you're probably looking for as it
allows one to apply arbitrary script to manipulate each commit on a
branch (or all branches).

Be sure to 1) google for real-world usage examples (stackoverflow
contains pretty few of them, for instance); 2) do this on a cloned
repository, not on your production one as most possibly you will need a
several rounds of trial and error.

1. http://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Is there a method to rebuild completely the repositoty ?

2012-09-19 Thread Konstantin Khomoutov
On Wed, 19 Sep 2012 13:18:39 +0300
Edgars Liepa exe...@gmail.com wrote:

 then why is the malware installed at exact same time as git ?
 Im sure, its coming from git. And i used several online tools, to
 scan the infected file..
 The fact that install folder is appdata + 2154711257125151751751 +
 351561561.exe shows that its not normal app..

Dude, many of us use Git for Windows, and many of follow upstream
developments by installing published versions as soon as they come out.
No one seems to have an issue you reported, so it looks like false
positive to me.

Hence I'd just tear this discussion down at this point.

And you did answer to a wrong question.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git bug reporting

2012-09-20 Thread Konstantin Khomoutov
On Thu, 20 Sep 2012 06:18:01 -0700 (PDT)
maxhodges m...@whiterabbitpress.com wrote:

 anyone know where I can submit bugs in Git?

Post to the main Git list which is git at vger.kernel.org

See http://vger.kernel.org/vger-lists.html#git for more info.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] avoid pulling binaries

2012-09-25 Thread Konstantin Khomoutov
On Tue, 25 Sep 2012 02:11:14 -0700 (PDT)
Angelo Borsotti angelo.borso...@gmail.com wrote:

 Suppose I have a private repository and a public one. I develop using
 my private repository, and at significant steps I do a commit in
 which I save all, sources] and binaries. The reason for saving
 binaries is to allow to recover a previously committed version
 without having then to rebuild all binaries. When I have completed
 the development of a feature, I push it to a public repository, one
 that is accessed by an integrator, that takes my contributes and
 other developers' as well, and integrates all of them. After having
 pulled all the contributed, the integrator always rebuilds the
 binaries. Therefore, there is no need for me to push binaries from my
 private repository to the public one, and for him to pull them. Is
 there a way in git to avoid to push and pull binaries in this
 workflow?

One way I can imagine, is using `git filter-branch` [1] with
its --three-filter option to drop the binaries matching certain
patttern from a branch which is ready to be proposed upstream.
Basically, when your feature branch is ready, you clone it (by means
of saying `git checkout -b newbranch thatbranch`) and then run
`git filter-branch --tree-filter ...` on the new branch to re-write it
dropping all the cruft from the commits.  Then you check if it looks OK,
propose it to upstream or replace the original branch with its
rewritten copy.

One other approach I might imagine is juggling with two branches -- one
clean, on which you just do the regular work and commit only the
relevant (that is, source) files, and another one -- a dirty branch,
which you check out from time to time, merge the clean branch in and
then commit the built cruft.  That is, you'll do continuous periodical
re-integration of the clean branch to the dirty branch with
commits of the binaries after each reintegration.

You can also have it backwards: do normal work on a dirty branch but
implement a simple policy about what you commit: commits touching
relevant files must be done separately from the commits touching
binary cruft (these can even be marked by something like [binary]
prefix in their commit messages).  You then periodically switch to a
clean branch and perform cherry-picks [2] from the dirty branch,
picking only the clean commits.

1. http://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html
2. http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] a generalization of git blame

2012-09-25 Thread Konstantin Khomoutov
On Tue, 25 Sep 2012 10:14:03 -0700 (PDT)
Xiaozhu Meng mxz...@gmail.com wrote:

[...]
 PS: I was trying to send an email to mailing list
 git at vger.kernel.org. But it always replied with 
[...]
 The error that the other server returned was: 550 550 5.7.1
 Content-Policy reject msg: The message contains HTML subpart,
 therefore we consider it SPAM or Outlook Virus.  TEXT/PLAIN is
 accepted.! BF:U 0.500236; S1753454Ab2IYRLL (state 17).

This one.  vger.kernel.org does not accept mails with HTML crap embedded
in them, and for good.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] avoid pulling binaries

2012-09-26 Thread Konstantin Khomoutov
On Wed, 26 Sep 2012 11:53:08 +0200
Angelo Borsotti angelo.borso...@gmail.com wrote:

[...]
- created a topic branch
- forked a develop branch from it
- done all the development work, several commits saving all files,
 sources and binaries
- git checkout topic
- git merge --squash --no-commit develop  (this avoids to move the
 develop history to the topic)
- git rm -r --cached *.all binaries
- mv .git/info/exclude .git/info/exclude.save
- put a line in .git/info/exclude: *.all binaries
- git commit -m some message
- mv .git/info/exclude.save .git/info/exclude
- git push remote topic
 
 This keeps a clean topic branch in which there are only source files
 and a clean history, that can then be pushed to a public remote
 repository.

I don't quite follow why you used the --squash option to `git merge`
-- as I understand it, it basically lumped together the whole series of
commits develop has WRT topic and created one gross commit with
these changes on top of topic, that is, you effectively lost the
development history of develop, just kept the changes made on it.
I see you even mentioned this in your comment but can you really
elaborate on your decision?

To be more clear: losing history information is, say, a notorious
problem with merges as implemented in Subversion, and Git, being a DVCS,
enjoys the fact merges in it maintain proper heritage.  This approach to
merging has several benefits: one (obvious) is that one can easily
inspect the evolution of the code, another one (less obvious) is that
provided the commits were created sensibly (one commit per logical
change), they can be later dealt with individually -- for instance,
reverted with `git revert` or cherry-picked to somewhere else

I understand that having just one gross commit in the end on your
feature branch might be just okay for your workflow, but as you might
just miss the point of merges as implemented in Git, I decided to warn
you of possible implications of your approach.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Merge and modification strategy

2012-09-26 Thread Konstantin Khomoutov
On Wed, 26 Sep 2012 04:24:39 -0700 (PDT)
Salah khamassisa...@gmail.com wrote:

[...]
 I have a little question though: Some team developers that I
 encountered would like to be able to see which files (codes) are
 modified in the present 
 time locally. They told me that in their projects, some codes have to
 be modified by one person at time. For example, developer A wants to
 modify a code, but receives a notification (or some alert) that
 developer B is changing the file in his local machine but that he has
 not committed yet. I am 
 aware this stops work a little bit, but those are their requirements.
 I am wondering if GIT offers this possibility to developers.
No, it does not.

Actually, the whole point of a DVCS system is to allow disconnected
development -- you have all the history locally and are able to do any
number of commits to any branch and only reconcile your work with
another repository (a reference one, for example) when you're back
online.  As you could see, since you have all the history locally, and
nothinhg prevents you from creating any number of branches locally and
juggle code between them as you see fit, the whole point of I am
editing this source file at the moment becomes quite moot.

One another problem is that Git does not even really track file names
in the sense many people expect it to, see [1].

1. 
https://git.wiki.kernel.org/index.php/GitFaq#Why_does_git_not_.22track.22_renames.3F

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] “Ghost” commit

2012-09-28 Thread Konstantin Khomoutov
On Thu, Sep 27, 2012 at 05:28:23AM -0700, Thiago Rossi wrote:

[...]
 Not sure what dangling means. I mean, how it differs from orphans/not being 
 referenced…
 
 In my current repository, b95cad5 has been replaced by b219846. Both have 
 the same parent. But b95cad5 became “invisible” in most interfaces, 
 including git log, gitk and GitX.
This commit should be reachable from the reflog of your repository as
amending the (tip) commit moved the HEAD in a non-linear way, so this
has been recorded to the reflog.  Read the `git reflog` manual for more
info.

In general, you should just absorb the fact that reaching for the commit
replaced by `git commit --amend` is an *unusual* case, and providing for
a way to routinely expose it in various parts of Git's user interface is
odd.  I mean, when you do `git commit --amend`, provided you read and
understood its manual page, you expect that command to completely
replace the commit you're amending, as if the original commit just did
not exist in the first place.  The fact the original commit is
still there by the time `git commit --amend` completed is just an
implementation detail of the Git storage backend which uses garbage
collection.  The reflog I mentioned above, while not being a recent
addition, have not always been there (and it's usually disabled in bare
repositories).

I understand you might have complications understanding why amending a
commit works like it works (that is, why the commit changes, I mean,
it's SHA-1 changes).  This is because the commit object consists of
metadata and a reference to a tree object, representing the state of
files associated with that commit.  The metadata, among other things,
records the date and time the commit was made, and the commit message.
Observe, that even if you did not change anything in the commit while
amending it (I bother to check if Git compares the new commit message
with the original one), the commit date/time changes and hence changes
the commit object and hence changes its SHA-1.  Changing the tree
referenced by the commit (say, adding a forgotten file) changes that
tree's SHA-1 hash which is recorded in the commit object and hence
changes the commit object itself.
If you like to dabble in such technical subtleties to better understand
your tools, I highly recommend to read Git from the bottom up [1],
and if you do not feel quite confident about those SHA-1 hashes and why
commit object reference tree objects and stuff, you could start from
The Git Parable [2] -- it's probably the simplest introduction to the
concepts and is very fun to read.

Another aspect is that different people have different tastes and
different ideas about how a VCS tool should work, and you might just
dislike the (frivolous) ways in which Git treats unpushed history (and
pushed, too, as you'll discover sometime).  You then can just try to
refrain from using `git commit --amend`.  This won't help if you want to
fix the commit message up [*], but if you forgot to add a file or want
to remove a file, you might just record another commit doing exactly
that.  This is not considered to be a best practice, but you know better
what works better for your workflow/approach.

[*] For instance, Fossil, while not allowing rewriting history at all,
would allow you to change the commit message, but it does this by
recording a special artifact in the repository, and the original
commit message is preserved for later inspection.  As you can see,
Git's developers have radically different idea about how to treat
the unpublished history.

1. http://newartisans.com/2008/04/git-from-the-bottom-up/
2. http://tom.preston-werner.com/2009/05/19/the-git-parable.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] How do I create download packages on GitHub?

2012-09-28 Thread Konstantin Khomoutov
On Fri, 28 Sep 2012 08:56:07 -0700 (PDT)
Simon Bingham smn...@gmail.com wrote:

 I would like to be able to create download packages (e.g. 
 https://github.com/bobsilverberg/ValidateThis/downloads) for major
 releases of my project on GitHub, but can't figure out how to do it.
 
 Currently on my download page (
 https://github.com/simonbingham/xindi/downloads) I have a single
 download button at the top of the page and no list of download
 packages.
 
 Can anyone help?

I'm not sure what your complication is really about.

I've just logged into my github account, navigated to my single
project, clicked the Downloads tab and now I'm seeing the Upload new
file box there which clearly offers me a way to upload a downloadable
package.

Isn't that what you're looking for?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] is master just a branch?

2012-10-04 Thread Konstantin Khomoutov
On Thu, 4 Oct 2012 02:12:19 -0700 (PDT)
maxhodges m...@whiterabbitpress.com wrote:

 Is master just a branch or is there anything special about it? If we
 delete it, can we just create a new branch called master? Do we need
 to Rebase to it or something to move the HEAD to it?

It's just a regular branch, nothing special at all in terms of its
technical implementation.
The only thing which is special about it, is that *by convention* a
newly created repository has its special HEAD reference pointing to a
branch named master, but the branch does not yet exist, and comes to
existence when you record the first commit (w/o first doing something
like `git checkout -b someotherbranch`).

 Somethings weird happened and we're trying to make things right
 again. Somehow I have two branches called origin/master 

First, this issue has nothing to do with your question above.

Second, what you're facing is probably because you have one remote
branch, which is really remotes/origin/branches and one local
branch, which is called origin/master -- you can see the difference
by running `git branch -a`.

Just an example done on a real repository:

C:\tmp\repogit branch -a
* master
  remotes/origin/HEAD - origin/master
  remotes/origin/develop
  remotes/origin/master

C:\tmp\repogit branch origin/master

C:\tmp\repogit branch -a
* master
  origin/master
  remotes/origin/HEAD - origin/master
  remotes/origin/develop
  remotes/origin/master

C:\tmp\repogit branch
* master
  origin/master

Note that without the -a (meaning all) option, `git branch`
shows you only your local branches.

To deal with this situation, refer to the remote branch via its
fuller name, remotes/origin/master.

Supposedly you should examine what's the difference between your local
branch master and your (probably wrongly named) branch
origin/master and decide which one to keep and which one to delete.
Also note that you can rename any branch using `git branch -m`.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



<    1   2   3   4   5   6   7   8   9   10   >