Re: [git-users] Did I loose my repository?

2013-03-25 Thread Philip Oakley
First, take a copy of the full project directory, including the .git directory. 
It's worth taking a second copy of the .git directory so you can do 
investigations on it.

Using pro-git or one of the other on-line guides, check the structure of the 
.git directory. Do you have a HEAD file, do you have a refs/ directory, do you 
have objects/ ?

If you have the objects you have a great chance of recovering much of your 
files and history.

Philip
  - Original Message - 
  From: Tom Avey 
  To: git-users@googlegroups.com 
  Sent: Monday, March 25, 2013 12:14 AM
  Subject: [git-users] Did I loose my repository?


  I'm not sure what I did not my git prompt now says ((...)) instead of master. 

  It's been working great for a couple of months (I'm still pretty new to git)

  git status and branch and add yields fatal: Not a git repository (or any of 
the parent directories): .git.

  git init says it is reinitializing existing Git repository but it doesn't 
appear to be fixed.

  My repository is only local as I program alone. 

  .git folder still exists.

  Can anyone help?  There's at least one branch I would like to recover.


  -- 
  You received this message because you are subscribed to the Google Groups 
Git for human beings group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.
   
   

  No virus found in this message.
  Checked by AVG - www.avg.com
  Version: 2013.0.2904 / Virus Database: 2641/6199 - Release Date: 03/23/13

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Did I loose my repository?

2013-03-25 Thread Konstantin Khomoutov
On Sun, 24 Mar 2013 17:14:36 -0700 (PDT)
Tom Avey toma...@fgbc.org wrote:

 I'm not sure what I did not my git prompt now says ((...)) instead of 
 master. 
 
 It's been working great for a couple of months (I'm still pretty new
 to git)
 
 git status and branch and add yields fatal: Not a git repository (or
 any of the parent directories): .git.
 
 git init says it is reinitializing existing Git repository but it
 doesn't appear to be fixed.
 
 My repository is only local as I program alone. 
 
 .git folder still exists.
 
 Can anyone help?  There's at least one branch I would like to recover.

Problems like this usually require certain hands-holding to solve, I
mean, repeated narrow questions asked and answers given to them.
So I'd recommend to join the #git IRC channel at freenode.net and ask
here.

From the problem statement, I feel curious about that .git. directory
mentioned (notice the trailing dot which shouldn't be there).

So I'm making a sheer guess and propose that you mis-edited one of
configuration files for your shell so it's trying to find a Git
directory by a wrong name.
Another (less sensible) possibility is that somehow you managed to
rename your .git directory to .git. and are unaware of this.
If you're using Windows, this is impossible but otherwise (any POSIX
system or Mac OS) you could have done this for real.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] Re: How can I make a clone of the git repository subfolders?

2013-03-25 Thread Jeroen De Vlieger
$ cd /home/site.name/
$ git clone giturl www

see 

$ git help clone

On Saturday, March 23, 2013 12:52:45 PM UTC+1, Denis Porplenko wrote:

 I am doing a project in the local environment Denwer
 My local sites in the folder / home / site.name / www /
 Inside the folder www must be project file.
 I want to make a clone of the repository in this folder.
 When it does, it is created within a folder called repository, and inside 
 is a project file.
 How to do that would have been inside the www project files no folder 
 named Repository?

 On Saturday, March 23, 2013 1:48:09 PM UTC+2, Denis Porplenko wrote:




-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] listing of ignored files is incomplete?

2013-03-25 Thread Jeroen De Vlieger
lets create a new git repo 

$ mkdir testRepo
$ cd testRepo
$ mkdir dirWithOnlyIgnoredFiles
$ touch dirWithOnlyIgnoredFiles/foo.log
$ touch test.txt
$ touch main.log
$ git init

now lets ignore the log files

$ echo '*.log'  .gitignore

stage all non-ignored files and creat a commit 

$ git add .
$ git commit -m 'foo'

now lets list the ignore files

$ git status --ignored
# On branch master
# Ignored files:
#   (use git add -f file... to include in what will be committed)
#
# main.log
nothing to commit (working directory clean)

Note the the log file in the 'dirWithOnlyIgnoredFiles' is *not* listed, 
although I would presume that it is indeed an ignored file.
What happened here?


Note that after adding a file into the folder that is tracked, then the log 
suddenly does show up

$ touch dirWithOnlyIgnoredFiles/test.txt
$ git add .
$ git commit -m 'add a file'

$ git status --ignored
# On branch master
# Ignored files:
#   (use git add -f file... to include in what will be committed)
#
# dirWithOnlyIgnoredFiles/foo.log
# main.log
nothing to commit (working directory clean)

with kind regards,

jeroen







-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: How can I make a clone of the git repository subfolders?

2013-03-25 Thread Konstantin Khomoutov
On Sat, 23 Mar 2013 04:52:45 -0700 (PDT)
Denis Porplenko denis.porple...@gmail.com wrote:

 I am doing a project in the local environment Denwer
 My local sites in the folder / home / site.name / www /
 Inside the folder www must be project file.
 I want to make a clone of the repository in this folder.
 When it does, it is created within a folder called repository, and
 inside is a project file.
 How to do that would have been inside the www project files no folder
 named Repository?

It's a bit hard to understand what you want.

If you have a pre-existing directory /home/site.name/www/ and just
want to fetch some project inside it, the best bet is to not use
`git clone` but do a bit of manual setup, and then fetch:

$ cd /home/site.name/www/
$ git init .
$ git remote add origin git_url
$ git fetch

The end result will be as if you did `git clone`.

If the current contents of the /home/site.name/www/ directory is
irrelevant, just use the fact `git clone` can be told where to put the
files.  So just do

$ git clone git_url /home/site.name/www/

In this case, the target directy either will be created (if it not yet
exists) or the project will be created in it (with the Git directory
created in it first).

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Did I loose my repository?

2013-03-25 Thread Tom Avey
Sorry - that was a typo. should be .git not .git.

On Monday, March 25, 2013 5:58:49 AM UTC-4, Konstantin Khomoutov wrote:

 On Sun, 24 Mar 2013 17:14:36 -0700 (PDT) 
 Tom Avey tom...@fgbc.org javascript: wrote: 

  I'm not sure what I did not my git prompt now says ((...)) instead of 
  master. 
  
  It's been working great for a couple of months (I'm still pretty new 
  to git) 
  
  git status and branch and add yields fatal: Not a git repository (or 
  any of the parent directories): .git. 
  
  git init says it is reinitializing existing Git repository but it 
  doesn't appear to be fixed. 
  
  My repository is only local as I program alone. 
  
  .git folder still exists. 
  
  Can anyone help?  There's at least one branch I would like to recover. 

 Problems like this usually require certain hands-holding to solve, I 
 mean, repeated narrow questions asked and answers given to them. 
 So I'd recommend to join the #git IRC channel at freenode.net and ask 
 here. 

 From the problem statement, I feel curious about that .git. directory 
 mentioned (notice the trailing dot which shouldn't be there). 

 So I'm making a sheer guess and propose that you mis-edited one of 
 configuration files for your shell so it's trying to find a Git 
 directory by a wrong name. 
 Another (less sensible) possibility is that somehow you managed to 
 rename your .git directory to .git. and are unaware of this. 
 If you're using Windows, this is impossible but otherwise (any POSIX 
 system or Mac OS) you could have done this for real. 


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Did I loose my repository?

2013-03-25 Thread Tom Avey
I get the same fatal: Not a girt repository...  Error. 

I'm not sure what I did.  Was running fine.  I did have a systems error that 
mentioned some hardware problem.  It restarted ok.  Perhaps it corrupted a 
file. 

There is only on branch I would like other recover. 

I have a 1kb file under. .git/refs/heads with the name of the branch I want and 
also under .git/logs/refs/heads. 

.git/index is a 1459kb file. 

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Did I loose my repository?

2013-03-25 Thread Tom Avey
The only this missing from the list of root files and directories given on 
pro-git is the /branches folder.  However, pro-git says that is not 
necessary.

Any ideas?



On Monday, March 25, 2013 4:25:20 AM UTC-4, Philip Oakley wrote:

  First, take a copy of the full project directory, including the .git 
 directory. It's worth taking a second copy of the .git directory so you can 
 do investigations on it.
  
 Using pro-git or one of the other on-line guides, check the structure of 
 the .git directory. Do you have a HEAD file, do you have a refs/ directory, 
 do you have objects/ ?
  
 If you have the objects you have a great chance of recovering much of your 
 files and history.
  
 Philip

 - Original Message - 
 *From:* Tom Avey javascript: 
 *To:* git-...@googlegroups.com javascript: 
 *Sent:* Monday, March 25, 2013 12:14 AM
 *Subject:* [git-users] Did I loose my repository?

 I'm not sure what I did not my git prompt now says ((...)) instead of 
 master. 

 It's been working great for a couple of months (I'm still pretty new to 
 git)

 git status and branch and add yields fatal: Not a git repository (or any 
 of the parent directories): .git.

 git init says it is reinitializing existing Git repository but it doesn't 
 appear to be fixed.

 My repository is only local as I program alone. 

 .git folder still exists.

 Can anyone help?  There's at least one branch I would like to recover.

 -- 
 You received this message because you are subscribed to the Google Groups 
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to git-users+...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  

 No virus found in this message.
 Checked by AVG - www.avg.com
 Version: 2013.0.2904 / Virus Database: 2641/6199 - Release Date: 03/23/13



-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] Re: listing of ignored files is incomplete?

2013-03-25 Thread Thomas Ferris Nicolaisen
On Monday, March 25, 2013 11:43:21 AM UTC+1, Jeroen De Vlieger wrote:

 lets create a new git repo 

 $ mkdir testRepo
 $ cd testRepo
 $ mkdir dirWithOnlyIgnoredFiles
 $ touch dirWithOnlyIgnoredFiles/foo.log
 $ touch test.txt
 $ touch main.log
 $ git init

 now lets ignore the log files

 $ echo '*.log'  .gitignore

 stage all non-ignored files and creat a commit 

 $ git add .
 $ git commit -m 'foo'

 now lets list the ignore files

 $ git status --ignored
 # On branch master
 # Ignored files:
 #   (use git add -f file... to include in what will be committed)
 #
 # main.log
 nothing to commit (working directory clean)

 Note the the log file in the 'dirWithOnlyIgnoredFiles' is *not* listed, 
 although I would presume that it is indeed an ignored file.
 What happened here?


Git ignores empty directories (by design). A directory with only ignored 
files is also counted as being empty. Hence, when you add a non-ignored 
file inside the directory, the directory gets noticed.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: listing of ignored files is incomplete?

2013-03-25 Thread Jeroen De Vlieger
Any idea on this design choice? when I ask to list ignored files, and some
are not listed, then it feels like bug. Or in this case a bad design
decision.

Jeroen


On Mon, Mar 25, 2013 at 2:02 PM, Thomas Ferris Nicolaisen
tfn...@gmail.comwrote:

 On Monday, March 25, 2013 11:43:21 AM UTC+1, Jeroen De Vlieger wrote:

 lets create a new git repo

 $ mkdir testRepo
 $ cd testRepo
 $ mkdir dirWithOnlyIgnoredFiles
 $ touch dirWithOnlyIgnoredFiles/foo.**log
 $ touch test.txt
 $ touch main.log
 $ git init

 now lets ignore the log files

 $ echo '*.log'  .gitignore

 stage all non-ignored files and creat a commit

 $ git add .
 $ git commit -m 'foo'

 now lets list the ignore files

 $ git status --ignored
 # On branch master
 # Ignored files:
 #   (use git add -f file... to include in what will be committed)
 #
 # main.log
 nothing to commit (working directory clean)

 Note the the log file in the 'dirWithOnlyIgnoredFiles' is *not* listed,
 although I would presume that it is indeed an ignored file.
 What happened here?


 Git ignores empty directories (by design). A directory with only ignored
 files is also counted as being empty. Hence, when you add a non-ignored
 file inside the directory, the directory gets noticed.

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Git for human beings group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/git-users/VS-1YqpIfPk/unsubscribe?hl=en-US
 .
 To unsubscribe from this group and all its topics, send an email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] Re: Did I loose my repository?

2013-03-25 Thread Tom Avey
Is there a way to blow away a corrupted .git repository, create a new one 
and add back in to the new one a branch from the corrupted repository?

On Sunday, March 24, 2013 8:14:36 PM UTC-4, Tom Avey wrote:

 I'm not sure what I did not my git prompt now says ((...)) instead of 
 master. 

 It's been working great for a couple of months (I'm still pretty new to 
 git)

 git status and branch and add yields fatal: Not a git repository (or any 
 of the parent directories): .git.

 git init says it is reinitializing existing Git repository but it doesn't 
 appear to be fixed.

 My repository is only local as I program alone. 

 .git folder still exists.

 Can anyone help?  There's at least one branch I would like to recover.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Did I loose my repository?

2013-03-25 Thread Les Nightingill
 
 I'm not sure what I did.  Was running fine.  I did have a systems error that 
 mentioned some hardware problem.  It restarted ok.  Perhaps it corrupted a 
 file. 

can you look in ~/.bash_history (or the equivalent for whatever shell you're 
using) to see what you did?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: listing of ignored files is incomplete?

2013-03-25 Thread Konstantin Khomoutov
On Mon, 25 Mar 2013 14:10:13 +0100
Jeroen De Vlieger fly@gmail.com wrote:

 Any idea on this design choice? when I ask to list ignored files, and
 some are not listed, then it feels like bug. Or in this case a bad
 design decision.

As Thomas said, Git does not track directories.  For instance, you
can't `git add` an empty directory, and `git add directory` does only
seem to make Git track that directory because it makes Git track *files*
under that directory.

I have no idea about why Git devs picked this design choice and not
some other; I also perceive this behaviour might be confusing.

Another thing to consider is that this list is dedicated to helping
novice users.  If you feel like you've found a bug or misfeature,
please feel free to bring it up on the main Git list [1] as Git devs
do not read the list which we're currently using for conversing.

1. https://gist.github.com/tfnico/4441562

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Keeping IDE files in a public project

2013-03-25 Thread Dale R. Worley
One approach might be to keep one set of branches that have your IDE
files, and one set of branches that don't.  Something like:

1. remote tracking branch from the authoritative repository
2. your working branch, without IDE files
3. your working branch(es), with IDE files

You work in #3.  Changes can be moved from #2 to #3 can be done with
ordinary merging.  Changes can be moved from #3 to #2 using something
like git filter-tree (presumably controlled by a version-controlled
file that tells what to leave out).

Dale

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: listing of ignored files is incomplete?

2013-03-25 Thread Konstantin Khomoutov
On Mon, 25 Mar 2013 16:31:54 +0100
Jeroen De Vlieger fly@gmail.com wrote:

 I guess, it depends on what you call empty. And even then it is kind
 of confusing with the statement that git tracks files, *not*
 directories.
 
 Hence I would expect git to also ignores files not the directory
 itself. Hence in my opinion it should list all ignored files in your
 working directory which are not tracked. I feel that it does not
 matter whether the directory, is empty or not. Especially since git
 doesn't really track directories, it tracks files. For that matter:
 Why does git even have concept of a directory, empty or otherwise? If
 it only tracks files?

To be precise, Git developers like to say Git does not even track
files, but it rather tracks *content* instead.  This is true in some
way: for instance Git does not explicitly tracks renames of files and
directories, and to detect them, its various history-walking tools
employ special heuristics.

On the other hand, one cannot ignore files completely, as most
contemporary computer systems on which Git is used use files as the
means of managing persistent storage of information.  So Git uses the
concept of file names to some extent: its tools working with local file
system manipulate files (obviously), and the so-called trees in the
Git database keep names of the original files used to place their
contents to the Git database.

Asking on the main Git list might be a good idea anyway.  At least you
might receive an explanation of the background for such design decision.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] git bare clone and pull to latest one

2013-03-25 Thread lei yang
Hi

 I git bare clone linux tree with
git clone git://
git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git

then I can git clone /home/lyang001/trees/linux-stable-rt/inux-stable-rt to
get it

my question if linux-stable-rt.git updates, how could I sync it to the
latest, git pull in the bare clone tree failed here, can you point me the
right steps to use bare clone tree


Lei

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] Cloning bare repository from Windows Server to Ubuntu Server

2013-03-25 Thread Cesar Casasola
I've a bare repository on Windows Server. I need  clone in a local 
repository in a directory of Ubuntu Server. 

Iam using followinf command but don't work:

git clone //ipadress/git$/dir/project.git

Help me please 

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] git bare clone and pull to latest one

2013-03-25 Thread Konstantin Khomoutov
On Tue, 26 Mar 2013 00:12:23 +0800
lei yang yanglei.f...@gmail.com wrote:

  I git bare clone linux tree with
 git clone git://
 git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git

It's not bare, unless you passed --bare to `git clone`.
Actually, if you intend to host a mirror of that tree (as, it seems, you
do), you should have used `git clone --mirror` (which implies --bare).

 then I can git
 clone /home/lyang001/trees/linux-stable-rt/inux-stable-rt to get it
 
 my question if linux-stable-rt.git updates, how could I sync it to the
 latest, git pull in the bare clone tree failed here, can you point me
 the right steps to use bare clone tree

Provided your mirror repository is indeed a mirror (a bare repo will
all remote refs fetched), the way to update it is

$ cd /home/lyang001/trees/linux-stable-rt/inux-stable-rt
$ git fetch +refs/*:refs/*

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Cloning bare repository from Windows Server to Ubuntu Server

2013-03-25 Thread Konstantin Khomoutov
On Mon, 25 Mar 2013 09:27:22 -0700 (PDT)
Cesar Casasola cesarsis...@gmail.com wrote:

 I've a bare repository on Windows Server. I need  clone in a local 
 repository in a directory of Ubuntu Server. 
 
 Iam using followinf command but don't work:
 
 git clone //ipadress/git$/dir/project.git

Yes, Ubuntu does not have Windows file sharing protocol built into its guts (as 
is the case with Windows), so //computername has no sense to Git (and to 
everything else) here.  To use it, you have to actually mount the Windows 
network share to a local directory, and fetch from there.

Open up a shell and do there:

$ id

^^^ notice your user name and primary group in the output

$ mkdir /tmp/server
$ sudo apt-get install cifs-utils
$ sudo mount -t cifs -o username=admin,uid=you,gid=you //ipaddress/git\$ 
/tmp/server

^^^ admin is the remote user name -- substitude by the real one; you is the 
local user name and group name, obtained on the first step.

$ cd ~/devel
$ git clone /tmp/server/dir/project.git
$ sudo umount /tmp/server  rmdir /tmp/server

Alternative ways:

1) If you have GNOME installed, most probably you also have its GVFS backend
   for CIFS installed.  If this is so, open up file explorer, navigate to
   smb://ipaddress/git$
   And if all goes well, a mount point was created for you under
   ~/.gvfs -- you can use it right away to clone from it.

2) If you have HTTP or FTP server on your Windows server, you could use
   `git bundle` on the server, fetch the bundle to your Ubuntu workstation,
   then clone from that bundle.

3) Implement full-fledged access to Git on your Windows machine and clone
   using SSH or HTTP protocols (i.e. as usually).
   This either requires installing a Windows port of OpenSSH and/or making
   Git play with IIS.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] A few questions which arose while considering moving a multi-hundred developer organization to Git.

2013-03-25 Thread Peter Pavlovich
Greetings,

I am a member of a multi-hundred person engineering organization. We are 
considering changing our SCM system to git. As we evaluate the potential 
impact of this move, a number of questions have arisen to which I am 
seeking guidance or opinions if not actual answers. I am sure some of these 
are considered quite basic and I expect I will discover the answers to 
these as I continue experiment with Git. I thought I would put this list 
out there and ask the community to contribute their opinions / experience 
early in my prototyping/evaluation process and possibly save myself some 
time and/or get insight into where I should look for answers. 

I thank the community in advance for any light you may be able to shed on 
these concerns/questions:


   - Is there any way to edit commit comments?
   - Is there any way to set up triggers/notifications when commits are 
   made either in general or for specific resources under source control?
   - Is there a way to auto-merge trivial conflicts?
   - Does git maintain/version file-level permissions? File-level metadata?
   - How does git handle backing out:
  - A commit that involved a file merge?
  - A commit that involved a file merge when additional commits have 
  been made after the merge commit?
  - A commit that involved the addition of a file? (assume it just 
  deletes it again?) 
  - Does git handle binary files well?
   - Does git preserve/version file encoding and Unicode?
   - Does git handle Symlinks?
   - How does git handle two people adding and then attempting to commit:
  - a file in the same directory with exactly the same name
  - a directory with the same name containing files (some of which have 
  the same names between the two users and some of which are named 
  differently).
   - If I commit a change to a file, others commit changes to that same 
   file and then I back out my original commit, is there a record of those 
   changes and could I get back that original commit that I made after I 
   back it out?
   - How does git handle very large numbers of files/folders? Would 50,000 
   files be overload for a single repository would would that many files 
   bring git to its knees, performance wise?
   - How does git handle CR/LF issues between OSs?
   

   - Our current SCM tool has a concept of a sparse repository or 
   workspace. The scenario in which this concept is important is outlined as 
   follows:


   - Assume I have a mature git repository containing files for a 
  particular software product. 
  - We have a central, master repository located on a server accessible 
  to our build system and developers. 
  - We have reached a point in our product's evolution at which files 
  in a given directory or directory tree have reached end-of-life and are 
no 
  longer needed for work going forward. 
  - These files/directories are still required for building / patching 
  previously existing versions of the product so we still want access to 
them 
  under certain circumstances. 
  - Our desire is that when a new developer joins our team and begins 
  working on this product, we don't want them to be burdened by having all 
of 
  the history of these old files that are not relevant any longer 
cluttering 
  up their locally cloned repositories and using space on their hard drives 
  that could be put to better uses. 
  
Our current SCM tool allows us to selectively defunct (or, effectively, 
ignore) a directory tree, single directory or individual files. This means 
that, when a new developer pulls down the code from the repository, they 
don't even know these ignored files exist. Does git offer any sort of 
similar functionality? We would like our developers to be able to see past 
history of the files that they are working with but not be burdened with 
the entire history of files that have effectively been deleted from the 
repository.


   - When I move a file from one place in the directory structure to 
   another, does git simply change the pointer to that file or does it carry 
   two copies of that file around in the history. I believe it just does the 
   pointer magic but I am being asked to verify this. I plan to try this on a 
   new test repository but I thought I'd ask the question here as well.


   - Our current SCM has a structural feature which seems logically similar 
   to git 'branches', let's call these structures buckets. Buckets are 
   hierarchical in that buckets inherit from parent buckets and buckets can 
   have child buckets. A file that is in a parent bucket is also in a child 
   (flows down). Changes to a file in a parent bucket also affect the files in 
   its children unless the child bucket has had an independent change made to 
   that same file in which case this requires a merge. I am wondering if 
   branches can be configured to work similarly either automatically or 
   through 

Re: [git-users] A few questions which arose while considering moving a multi-hundred developer organization to Git.

2013-03-25 Thread Konstantin Khomoutov
On Mon, 25 Mar 2013 10:51:34 -0700 (PDT)
Peter Pavlovich pavlov...@gmail.com wrote:

[...]
- Is there any way to edit commit comments?

Yes, at the time a commit is done.
Yes, after a commit is done but not yet pushed (amendment).
If a commit is pushed, even then you are able to change it, but pushing
it out then would create problems for those who happened to fetch
the original commit to their repos.  I think we'll stop here at the
moment.

- Is there any way to set up triggers/notifications when commits
 are made either in general or for specific resources under source
 control?

Git supports hooks for their repositories: programs (usually scripts)
which run before/at/after certain events in the repository.
There are post-commit hooks, post-push hooks etc.

What are resources?

- Is there a way to auto-merge trivial conflicts?

What are trivial conflicts?
If you mean changes to different areas of the same file, then the
answer is yes.
Git also supports merging strategies (like our changes trump theirs),
and has a special tool (git rerere) which is able to remember how a
particular merge with conflicts has been carried out by the developer
and automate this the next time this happend.

- Does git maintain/version file-level permissions? File-level
 metadata?

Stock Git does not support any permissions on anything.  I mean, you
either has push access (because you has been authenticated and
authorized by whatever serves Git for you -- SSH or HTTP[S]) or not.
There are specialized server-side front-ends (gitolite is the most
popular one) which provide finer-grainer access controls, but AFAIK
this works on a per-branch level only.

You should understand very well that Git does not explicitly track
files (!).  I mean, it does track them physically but it does not
attach any sacred meaning to them -- their contents is everything it
cares about.

What what is file-level metadata?

- How does git handle backing out:
   - A commit that involved a file merge?

There's no file merges in Git.  Git operates on trees only.

Yes, you can back put a merge commit, but this might have certain
repercussions which have to be understood and planned.

   - A commit that involved a file merge when additional commits
 have been made after the merge commit?
   - A commit that involved the addition of a file? (assume it
 just deletes it again?) 

Git is able to back out any commit at all since backing out a commit
means recording another commit which reverts certain changes on a
textual level.

   - Does git handle binary files well?

It does handle binary files.  But if by handles you mean something
special like being able to checkout one huge file out of a (remote)
repository, modify it and commit back, then no.  Or be more precise.

- Does git preserve/version file encoding and Unicode?

Git does not care about the encoding of files -- it only ever messes
with EOL conversion if it treats a file as text.
If Git thinks (or is told to think) a file as binary (no EOL
conversions), the file is manipulated as is.

Also note that the word Unicode supposedly used in a wrong context
here since Unicode itself does not specify any encodings.

- Does git handle Symlinks?

On POSIX platforms and Mac OS; not on Windows.

- How does git handle two people adding and then attempting to
 commit:
   - a file in the same directory with exactly the same name
   - a directory with the same name containing files (some of
 which have the same names between the two users and some of which are
 named differently).

Git is a DVCS so do not confuse committing and pushing commits to a
shared repository -- these are distinct things completely.  Git does
not support server-side merging (I beleive no DVCS does).  From this
it logically follows that Git does it support pushing selected files
and/or directories.  It's only possible to push commits and series of
commits which represent complete snapshots of the whole repository.
That's how a DVCS works.

With regard to server-side conflicts, the Git workflow looks like this.
Suppose you fetched from a shared repository, and decided to do some
work on its branch named foo.  Presently, the tip commit of that
branch is A.  You record some more commits on it (say, B and C) and
attempt to update with them that same branch foo in the shared
repository.  A Git instance working on the server will take your commits
(B and C), notice that B's parent is A and see if the current tip of
the branch you're trying to update on the server is also A.  If it
isn't, your push operation will simply fail (unless forced), and you
will have to first fetch the updated state of that branch, merge it
into your own work (or rebase your own work upon the new state of the
branch), possibly resolving any conflicts, and then retry your push.

- If I commit a change to a file, others commit changes to that
 same file and then I back out my original commit, is there a record
 of those 

Re: [git-users] A few questions which arose while considering moving a multi-hundred developer organization to Git.

2013-03-25 Thread Konstantin Khomoutov
On Mon, Mar 25, 2013 at 01:04:53PM -0700, Peter Pavlovich wrote:

[...]
- It appears your comments for the can git support 'sparse' workspaces 
question was lost. All that you posted was Yes and No. Git supports. It 
appears that the remainder of your comments were cut off.

Sorry.  I've decided to first deal with other chunks of your message and
forgot to return to this one.

Yes and no means that Git does not support directly what you
described: there's no way to check out a single directory out of a tip
commit of a branch, nor are there any ways to make Git not check out
something.  On the other hand, I reckon that instead of trying to hide
parts of a repository, a better approach might be going modular instead:
Git supports the so-called submodules.  A submodule is a (completely)
independent repository, which is referenced by another repository (works
pretty much like Subversion externals if you're familiar).  That way,
you could structure your repository so that there is a relatively small
core repository which references a number of satellite repositories
containing supporting files.  A given commit in the referring repository
always links to exact specific commits of its submodules, so any state
might be reconstructed precisely.

Another thing which might help you while not addressing the specific
problem are sparse clones -- the only problem is that they are
depth-sparse, not width-spare: you can tell Git to only fetch a tip
commit (or N commits) of a specified branch to conserve bandwidth and
disk space.  The resulting repository will obviously be lame compared
to a full-fledged clone, but that would work OK for certain workflows.

Git also supports several bizzare approaches to faking history
records, namely, git-replace [2] and grafting [3].  Replacing allows you
to have a shorter/smaller version of a repository while at the same
time having a huge record of past history available for those who need
it.  I have no personal experience with these tools so will stop
handwaving about them at this point.

- For the last question, how then would one update a branch of a 
repository to include changes in the main branch. For example, let's 
assume I have a brand new git repo. I add some files to it, let's say, 
representing version A of my application. I now branch this repo in 
order to work on version B of my repo. I want the B branch to be an 
integration branch into which two separate teams will dump their 
 eventual 
changes for two headlines Each of these two teams then create separate 
branches stemming from B, call them B1 and B2 representing work on 
these two independent headlines. Team 1 reaches a milestone and wants to 
push their completed code into B and begin work on the next headline. 
They would like to do something in Git to synchronize their B1 branch 
with the contents of B so that the two branches would, upon completion 
 of 
that something, have identical contents. Assuming that is possible and 
 it 
is now completed, team 2 would like to pull the current state of B 
 into 
their own branch B1, merging that content with what they have done in 
B2 so that, when they are done, B2 would have all of the changes that B1 
pushed up to B + any additional, interim changes they have made thus far 
 in 
B2 prior to this action. When they are done with their headline, they 
 would 
like to sync B2 with B so that B would then have all of their 
 changes 
too. Is there any way to accomplish this sort of thing in Git? How would 
one coordinate the work of multiple teams working on different headlines 
all of which eventually have to be merged into one codebase?

Git has three devices to exchange commits between branches:

* Merging. Different SCMs put somwehat different semantics to this.
  Since Git always operate on complete repository snapshots, when you
  merge branch B into A, the result (a new commit on A) means A now
  contains changes on both A and B.  Since a merge commit records all
  of its parents (Git supports octopus merges so there might be more
  than two parents), it's relatively straighforward to do
  reintegration merges: for instance, if we consider our merger of B
  and A, the next attempt to merge B into A, after both branches were
  updated, will do a three-way merge, using the tip commits of both
  branches and their merge base commit -- the result of the last
  merge.  So merging is the most popular way of continuous exchange of
  commits between branches.

* Cherry-picking.  This is taking commits from one branch and applying
  them onto another as if they were just patches.  This does not record
  any ancestry information but Git is smart enough to detect already
  applied changes, so when you cherry-pick a commit from B to A and
  later merge B to A, there's a good chance there will not be a conflict
  due to (apparent) double application of that cherry-picked commit 

[git-users] yum install git fails on Centos 6.2

2013-03-25 Thread Steve Owens
I have followed all of the instructions for installing Git on Centos as 
per: http://git-scm.com/book/en/Getting-Started-Installing-Git

This includes executing the following commands:

sudo yum install curl-devel expat-devel gettext-devel \ openssl-devel 
zlib-devel

and 

sudo yum install git-core

The second command fails with: 

[sowens@loadgenerator73 ~]$ sudo yum install git-core
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
-- Running transaction check
--- Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed
-- Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: 
git-1.7.1-3.el6_4.1.x86_64
-- Processing Dependency: perl(Error) for package: 
git-1.7.1-3.el6_4.1.x86_64
-- Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64
-- Processing Dependency: libz.so.1(ZLIB_1.2.0)(64bit) for package: 
git-1.7.1-3.el6_4.1.x86_64
-- Running transaction check
--- Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed
-- Processing Dependency: libz.so.1(ZLIB_1.2.0)(64bit) for package: 
git-1.7.1-3.el6_4.1.x86_64
--- Package perl-Error.noarch 1:0.17015-4.el6 will be installed
--- Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be installed
-- Finished Dependency Resolution
Error: Package: git-1.7.1-3.el6_4.1.x86_64 (update)
   Requires: libz.so.1(ZLIB_1.2.0)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Yet my /usr/local/lib dir contains:

-rw-r--r-- 1 root root  125718 Feb 28 11:11 libz.a
lrwxrwxrwx 1 root root  13 Feb 28 11:11 libz.so - libz.so.1.2.7
lrwxrwxrwx 1 root root  13 Feb 28 11:11 libz.so.1 - libz.so.1.2.7
-rwxr-xr-x 1 root root   98739 Feb 28 11:11 libz.so.1.2.7






-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] Deleted by us while cherry-picking a gerrit in the same project

2013-03-25 Thread python . prog29

I am trying to cherry-pick a gerrit based on git project test.git ,for some 
gerrits I see it tries to delete as below by creating one more test 
folder inside the test directory..any idea what could be wrong here?please 
let me know if you need more details.


Unmerged paths:
#   (use git add/rm file... as appropriate to mark resolution)
#
#   deleted by us:  test/ROE/SEME/src/cmpc/cmpc.c

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] git bare clone and pull to latest one

2013-03-25 Thread lei yang
On Tue, Mar 26, 2013 at 1:14 AM, Konstantin Khomoutov 
flatw...@users.sourceforge.net wrote:

 On Tue, 26 Mar 2013 00:12:23 +0800
 lei yang yanglei.f...@gmail.com wrote:

   I git bare clone linux tree with
  git clone git://
  git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git

 It's not bare, unless you passed --bare to `git clone`.


Yes I want I'm missed --bare

Actually, if you intend to host a mirror of that tree (as, it seems, you
 do), you should have used `git clone --mirror` (which implies --bare).


Thanks for the tips


  then I can git
  clone /home/lyang001/trees/linux-stable-rt/inux-stable-rt to get it
 
  my question if linux-stable-rt.git updates, how could I sync it to the
  latest, git pull in the bare clone tree failed here, can you point me
  the right steps to use bare clone tree

 Provided your mirror repository is indeed a mirror (a bare repo will
 all remote refs fetched), the way to update it is

 $ cd /home/lyang001/trees/linux-stable-rt/inux-stable-rt
 $ git fetch +refs/*:refs/*



I will have a try

Lei

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.