[git-users] Re: [PATCH] build: add default configuration

2013-09-21 Thread David Aguilar
Felipe Contreras felipe.contre...@gmail.com wrote:
I know 'git ci' is perfectly fine shortcut to 'git commit'.

Either way, it doesn't matter. Even if we agree that /etc/gitconfig.d
is what we want, or we add an /usr/share/git/config, Junio is not
going to apply any patch, even if it's what most users want.

Please stop making personal attacks that add nothing to your argument. No one 
cares.  Let it be.

Let's move this in a more constructive direction then, no?

How about working on documenting the new aliases and add a knob to the Makefile 
so that we can choose whether or not to install the stock config?

I'm not trying to fight this patch -- the idea is nice. Most users and distros 
probably won't change stock aliases, so your energy may be better spent getting 
consensus on what the stock aliases could be. 

Would it not be better to have these aliases, plus/minus one or two, then none 
at all?
...
Yes I know about .rpmsave files. For rpm, it'll refuse to upgrade Git since 
this new file will conflict with an existing package.  That's easier to deal 
with because the config package can then be independently modified to install 
its file to eg git.d/foo.conf in the directory include example.  That would 
then allow the upgrade, and at no point did the intended config ever get lost.

Puppet users, for example, may end up with rpmsave turds on their systems, 
though. When you are managing lots of machines this can be very annoying -- 
that's why I mentioned it.  Don't bother arguing this point any further. It's 
boring.
...
In summary -- makefile knob, please, and at least mention the stock aliases 
somewhere in the docs so that the users can know to read /etc/gitconfig if they 
want to know more.  Who knows, maybe it will get applied, but it definitively 
won't if all you do is whine about it.

-- 
David

-- 
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: [PATCH] build: add default configuration

2013-09-20 Thread David Aguilar
Felipe Contreras felipe.contre...@gmail.com wrote:
On Wed, Sep 18, 2013 at 9:30 PM, David Aguilar dav...@gmail.com
wrote:
On Wed, Sep 18, 2013 at 1:13 PM, David Aguilar dav...@gmail.com
wrote:

 Will this not conflict with folks that supply their own gitconfig?

 You mean people that provide their own ETC_GITCONFIG? If you mean
 distributions, their packaging would override /etc/gitconfig, if you
 mean people that have already a /etc/gitconfig, packaging systems
 usually save the old one so they can solve the conflict manually
(e.g.
 /etc/gitconfig.pacsave). So no, it would not conflict.

 Yuck. Yes, that one. I package my own /etc/gitconfig (as we have long
advertised as the way to do it)

You package /etc/gitconfig *outside* the git package? I don't see how
that could have been ever advertised as the way to do it.

Okay so how exactly are we supposed to do it?  Duh, rpm is the right choice for 
redhat systems. 

Users don't package /etc/gitconfig outside git.

Wrong. Existence proof: me. 


 I like the idea. Docs?  Also, should this not be done in the C side
so that we don't waste time reading the config, and also prevent users
from overriding these?

 But we want them to be easily readable, and possibly allow
 distributions to easily modify them.

 In that case I take it back -- I dont like that approach.  We want
consistency, not divergence. This encourages the former.

So you think we have more consistency right now? We don't even have a
predefined /etc/gitconfig, that creates more inconsistency, as
everybody's configs and aliases are very very different.

This patch would definitely make things more consistent.

We don't need this patch to allow distros to modify aliases. Likewise, allowing 
the aliases to diverge is less consistent. Do it at a lower level. 

I also agree with Junio's notes about ci. Something short that can add and 
remove from the index would be nice. 


-- 
David

-- 
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: [PATCH] build: add default configuration

2013-09-20 Thread David Aguilar
Felipe Contreras felipe.contre...@gmail.com wrote:
David Aguilar wrote:
 Felipe Contreras felipe.contre...@gmail.com wrote:
 On Wed, Sep 18, 2013 at 9:30 PM, David Aguilar dav...@gmail.com
 wrote:
 On Wed, Sep 18, 2013 at 1:13 PM, David Aguilar dav...@gmail.com
 wrote:
 
  Will this not conflict with folks that supply their own
gitconfig?
 
  You mean people that provide their own ETC_GITCONFIG? If you mean
  distributions, their packaging would override /etc/gitconfig, if
you
  mean people that have already a /etc/gitconfig, packaging systems
  usually save the old one so they can solve the conflict manually
 (e.g.
  /etc/gitconfig.pacsave). So no, it would not conflict.
 
  Yuck. Yes, that one. I package my own /etc/gitconfig (as we have
long
 advertised as the way to do it)
 
 You package /etc/gitconfig *outside* the git package? I don't see
how
 that could have been ever advertised as the way to do it.
 
 Okay so how exactly are we supposed to do it?  Duh, rpm is the right
choice for redhat systems. 

The same way kerberos, mariadb, apache, and essentially every other
tool that
has a configuration file in /etc.

Good point. These tools (apache, for example) allow inclusion of a directory. 
Users are encouraged to package their stuff inside eg httpd.d/, and the distros 
ship a neutral config that includes that directory. 

Your patch does not add this capability, so by your own definition it's 
incomplete.  As-is, the patch is half-baked.

If we have a clear upgrade path -- eg move your current configs over to 
/etc/git.d/your.conf -- then it's a non-issue. 

As-is, you're asking users to manually deal with the fallout. You're also 
asking users to modify a package-manager controlled file (after your patch), 
which IMO is suboptimal. 


 Users don't package /etc/gitconfig outside git.
 
 Wrong. Existence proof: me. 

You as a user are not packaging it, it's you as a system adimistrator.

Strawman. I represent at least at least a hundred users, but who cares. It 
doesn't matter.  The patch is incomplete. 

Either
way, you are 0.0001% of Git's userbase, you are not representative.

And your point is what exactly?  That once proven wrong you move the goalposts?


  I like the idea. Docs?  Also, should this not be done in the C
side
 so that we don't waste time reading the config, and also prevent
users
 from overriding these?
 
  But we want them to be easily readable, and possibly allow
  distributions to easily modify them.
 
  In that case I take it back -- I dont like that approach.  We want
 consistency, not divergence. This encourages the former.
 
 So you think we have more consistency right now? We don't even have
a
 predefined /etc/gitconfig, that creates more inconsistency, as
 everybody's configs and aliases are very very different.
 
 This patch would definitely make things more consistent.
 
 We don't need this patch to allow distros to modify aliases.
Likewise, allowing the aliases to diverge is less consistent. Do it at
a lower level. 

We already allow the aliases to diverge, we allow it much more.

The pach will make the aliases more consistent.

 I also agree with Junio's notes about ci. Something short that can
add and remove from the index would be nice. 

cvs ci, svn ci, hg ci, they all work, but suddenly ci is not good
enough for Git? Yeah, sure.

IMO this isn't the kind of thing that you or I can decide in isolation.  Maybe 
it is, or maybe the real differences between the ci mental model are enough 
that it isn't. But you don't actually know the answer. You might think you do, 
but your guess is just as good/bad/ugly as mine. 

-- 
David

-- 
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: [PATCH] build: add default configuration

2013-09-18 Thread David Aguilar
On Wed, Sep 18, 2013 at 1:13 PM, David Aguilar dav...@gmail.com wrote:

 Will this not conflict with folks that supply their own gitconfig?

 You mean people that provide their own ETC_GITCONFIG? If you mean
distributions, their packaging would override /etc/gitconfig, if you
mean people that have already a /etc/gitconfig, packaging systems
usually save the old one so they can solve the conflict manually (e.g.
/etc/gitconfig.pacsave). So no, it would not conflict.

Yuck. Yes, that one. I package my own /etc/gitconfig (as we have long 
advertised as the way to do it) and asking users to manually fix up thousands 
of machines is a bad idea. 

Yes, thousands.  We're much past 30,000 cores at the moment. 

 I like the idea. Docs?  Also, should this not be done in the C side so that 
 we don't waste time reading the config, and also prevent users from 
 overriding these?

 But we want them to be easily readable, and possibly allow
distributions to easily modify them.

In that case I take it back -- I dont like that approach.  We want consistency, 
not divergence. This encourages the former. 
-- 
David

-- 
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] conflicts and merges

2011-12-01 Thread David Aguilar
On Dec 1, 2011, at 8:05 PM, Rustom Mody rustompm...@gmail.com wrote:

As a git noob I am handling my first conflicts.
I find the conflict-marker-ed files hard to decipher
with the 


etc

Is it possible to read the same information in emacs with ediff?

I guess its related (or not dunno) how to grok 3 way merge?



git mergetool -t emerge

-- 
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 revision number

2011-11-17 Thread David Aguilar
On Nov 17, 2011, at 9:11 PM, PJ Weisberg p...@irregularexpressions.net wrote:

 I'm looking for something in Git analogous to the revision numbers in
 Subversion.  Pretty much exactly what you get from `git describe', but
 I don't want it to be dependent on any tags or refs.  Is there any way
 to get something like that out of Git?

 -PJ

git rev-parse HEAD
-- 
David (mobile)


-- 
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] Could you please tell me how to fetch a single file?

2011-11-01 Thread David Aguilar
On Nov 1, 2011, at 12:04 PM, Phlip phlip2...@gmail.com wrote:

 Git documentation is useless

 +1.

 Someone needs to assume that some people here don't want to work
 full-time with git, and learn all its tiny details just to get
 anything done. I'm aware of the various tutorials and cheat-sheets out
 there, but there's just nothing that sketches every path between two
 points. And gods help you if you want to revert some kind of complex
 multi-branch merge. I always just git clone the revision I need into a
 scratch folder, then copy all the source over. Sheesh...

what are you doing to improve the situation?

what documentation, specifically? git-scm.com has good links and
progit is quite comprehensive. are there points that can be improved?
helpful criticism helps to improve the situation instead of
complaining into the abyss.



please help the community help you.

-- 
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-svn hashcode difference before and after dcommit

2011-10-13 Thread David Aguilar
On Oct 13, 2011, at 8:12 PM, abgalphabet arthur2...@gmail.com wrote:

 I found that the hashcode of the same commit is different before and
 after i run git svn dcommit.
 Is it a expected behavior or is it a bug?

expected behavior.

do you use git svn rebase?

here's a good writeup:
http://learn.github.com/p/git-svn.html


 If it's not a bug, I would have a headache about this as i have a
 small team using git-svn. Everytime i pull all the changes from my
 colleagues (they clone from my git repo) and then dcommit (sync to
 SVN). All the hashcode are changed and i need all my colleague in the
 team to rebase again. that means they need do something like reset
 some commits (which are local commit to their git repo only) and pull
 again from my repo after svn sync.
 
 I hope i can describe the scenario clearly and anybody has an idea
 about that wheather on the git-svn config or the git-svn workflow.

-- 
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-cvsimport fails with fatal: Cannot lock the ref

2011-09-28 Thread David Aguilar
On Sep 27, 2011, at 8:42 PM, Godmar Back god...@gmail.com wrote:

 On Tue, Sep 27, 2011 at 10:18 PM, David Aguilar dav...@gmail.com wrote:
 On Sep 27, 2011, at 6:30 PM, Godmar Back god...@gmail.com wrote:
 
 
 Hi,
 
 I'm trying to migrate from CVS to git. To that end, I'm trying to use the 
 'git cvsimport' command to import an existing CVS repository into a remote 
 bare git repository I've created.
 
 I have set up the git repository using 'git init --bare repos.git' and I 
 have verified that I can clone this (empty) repository over an ssh 
 transport. I have set up ssh public key authentication successfully.
 
 However, when I try to import the CVS repository into the remote repository 
 using:
 
 git cvsimport -i -r git@mygithost:.git -v -d :pserver: reposname
 
 I think the error is because you are trying to tell it to use the remote 
 repo, which is not how it works.
 
 the remote -r flag is best omitted for this use case (one-time conversion)
 
 create a new local repo and do it there:
 
 git cvsimport -C newrepo  ...
 
 then push it to your shared repo
 
 cd newrepo
 git remote add origin git@host:foo.git
 git push origin master
 
 then you're best off doing new work in clones and discard the repo used for 
 the conversion. 
 
 
 Thanks for your reply. However, shouldn't it be 
 
 git push origin --all
 
 to make sure all branches that were in the CVS will be available in the new 
 git repository?
 
  - Godmar

that's up to your preference. when I convert cvs repos I've never needed its 
old branches. ymmv.  they just kinda get in the way for me; I personally prefer 
to just get a master branch when switching to git and leave the old stuff 
behind.

after converting cvs repos I also like to filter-branch it to rewrite commits 
to have better authorship by looking up name/email  in ldap (or some other 
method) from the username.  filter-branch can be twisted into doing some good 
stuff after importing and before everyone starts basing work on it.


 git clone git@host:foo.git
 
 there's a section where importing a cvs archive is covered in this doc:
 
 http://manpages.ubuntu.com/manpages/lucid/man7/gitcvs-migration.7.html
 
 
 it'll start retrieving the CVS histories, but then fail with:
 
 fatal: Cannot lock the ref 'refs/remotes/git@mygithost:repos.git/master'.
 Cannot write branch master for update: Bad file descriptor
 
 What does that mean, and what is the correct workflow to migrate from CVS to 
 git?
 I'm using git 1.7.0.4.
 
 Note that I wish to keep CVS's centralized model for now by using a 
 centralized bare repository that will function as a shared upstream for all 
 developers in our project; that's why I am trying to import the CVS 
 repository into it.
 
 Thanks for any help.
 
  - Godmar
 -- 
 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.
 

-- 
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] SmartGit and Gitolite

2011-09-02 Thread David Aguilar
On Sep 2, 2011, at 4:31 PM, Bill Shoenhair bshoenh...@gmail.com wrote:

 Hello, 
 
 Is anyone using the SmartGit GUI and Git/Gitolite. Are there any issues that 
 you can see? 
 
 Thanks, 
 Bill 

I haven't used it myself, but git-cola is pretty sweet ;-)

http://cola.tuxfamily.org/
https://github.com/davvid/git-cola
-- 
David

-- 
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 define commit policy

2011-08-17 Thread David Aguilar
If you control the git install you can modify the template files to enable 
pre-commit hooks (but you can still disable them with a git commit flag).  
These are the boiler plate files written to .git/ at init and clone time. 

you can also run checks using Jenkins or whatnot against a designated shared 
repo. There's a handful of hooks you can run on the receiving (server) side 
too.  What are you trying to accomplish?  Reading about git hooks is one 
place to start. man githooks
-- 
David

On Aug 16, 2011, at 11:05 PM, Pankaj Gupta synopsys_pan...@yahoo.co.in wrote:

 When user commit in git repo. we would like certain checks to be done.
 How can that be achieved.
 Is there a manual which talks about that?
 
 P
 
 -- 
 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.
 

-- 
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] xml and diff

2011-07-17 Thread David Aguilar
On Sun, Jul 17, 2011 at 06:21:36PM -0700, James C. wrote:
 hello,
 
 I am trying to create an analytics tool on an xml file and would like
 to be able to know the exact item in the xml tree that was added,
 created or deleted.  For example,
 
 parent
   childA/child
   childB/child
   childC/child
 /parent
 
 Make a change and remove child B so now the file looks like the below:
 
 parent
   childA/child
   childC/child
 /parent
 
 git diff will tell be that line 3 has been removed, but what i would
 really like to know is that parent has been changed. What would be
 perfect would be DOM access based on the change. Not sure if this is
 possible or not.  Any ideas would be great. Thank you

There's two steps to breaking down this problem.

Step one is a tool that can compare two XML files and show you
the DOM information you want to see.  You might have to write
it yourself, or maybe you can find one that does this already.
It should take both files as input on the command-line.
Even better would be if it also allowed you to compare
three files (where one is the merge-base) as well.

It looks like someone may have already written something that
is either very close or identical to what you're looking for:

http://www.logilab.org/859
http://diffxml.sourceforge.net/

The next step is to integrate it with git.  You can customize
git difftool and git mergetool and create a custom tool
which can call your tool.  Here's an example for difftool:

Let's say the tool is called 'xmldiff'.
You can teach difftool about it by setting:

% git config --global difftool.xmldiff.cmd 'xmldiff $LOCAL $REMOTE'

..and then invoke it using difftool:

% git difftool -t xmldiff -- foo.xml
-- 
David

-- 
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: command not found

2011-04-03 Thread David Aguilar
On Apr 3, 2011, at 5:42 PM, suresh suresh.amritap...@gmail.com wrote:

 Hi
 
 I am able to use, git --version, git init, git commit -a successfully
 from my ubuntu 10.04 running git version 1.7.0.4. But when i give
 
 
 git config core.editor vi
 
 I get an error message, git: command not found.
 
 What is happening?
 
 suresh

What happens if you do this?:

git config --global core.editor vim

Do you have an executable called git-config anywhere in your path? (you 
shouldn't). Have you always used ubuntu's build or did you ever build your own?
-- 
David

-- 
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 tutorial video

2011-01-29 Thread David Aguilar



--  
David


On Jan 28, 2011, at 7:26 PM, rjvaughn rjvau...@gmail.com wrote:


Interesting. Is this an accurate depiction of the management issues
encountered when moving to git?

http://www.youtube.com/watch?v=CDeG4S-mJtsfeature=feedu

Please discuss.


Funny? Mebbe
Accurate? No.

The git UI is darn easy these days.  They say that it's better to stay  
quiet and let everyone think you're a fool than to open your mouth and  
prove them all correct. The author of this video--totally foolish.   
I'll give them credit for having an active imagination, tho.


Anyways, haha, good one. Is there anything to discuss? No.

--
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: changes between commits

2011-01-18 Thread David Aguilar

On Jan 18, 2011, at 8:25 PM, Jeenu gro...@jeenuv.otherinbox.com wrote:




On Jan 19, 8:27 am, Macsig sigbac...@gmail.com wrote:

Hello all,
is there a way to see all the changes made between 2 non-consecutive
commits?


git show


git diff $commit1 $commit2

Ditto for git difftool.
--
David

--
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] Unable to delete remote branch with a strange name

2010-12-27 Thread David Aguilar

On Dec 27, 2010, at 10:51 PM, Jingzhao Ou jingzhao...@gmail.com wrote:


Hi, all,

When I checked out a git repository, it has the following remote
branches:

$ git br -r
 origin/HEAD - origin/master
 origin/master
 origin/dev/main
 origin/remotes/origin/dev/main

I tried to delete the last branch with a strange long name. Using git
push to delete it would fail.

$ git push origin :remotes/origin/dev/main


How about
git push origin :refs/heads/remotes/origin/dev/main
?

The refs/ absolute path is useful when ambiguities exist.   
Reading .git/config gives some hints about how it fits together.




Pushing to j...@xx.xx.xx.xx:gsfw/omu_fw
error: dst refspec remotes/origin/dev/main matches more than one.
error: failed to push some refs to 'j...@xx.xx.xx.xx:gsfw/omu_fw'

However, I can create a new branch from it:

$ git co -b jou.temp origin/remotes/origin/dev/main
Branch jou.temp3 set up to track remote branch remotes/origin/dev/main
from origin.
Switched to a new branch 'jou.temp3'

But again, I cannot push any changes in jou.temp3 branch to that
weird branch:

$ git push origin HEAD:remotes/origin/dev/main
error: dst refspec remotes/origin/dev/main matches more than one.
error: failed to push some refs to 'j...@xx.xx.xx.xx:gsfw/omu_fw'

I guess somehow, git is confused by origin/dev/main and origin/
remotes/origin/dev/main. Especially, it cannot identify the latter
properly.

I wonder if any one can give me some suggestions on how to deal with
this situation.

Thanks a lot!
Jingzhao

--
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-us...@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 
.




--
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-us...@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] adding parent directory to repository

2010-10-24 Thread David Aguilar

On Oct 24, 2010, at 8:20 AM, Cliff clifford.me...@gmail.com wrote:


Hi,

I've been using git successfully on a project and now I realize that I
want to expand the directories under git control.  In particular, I
realized that I want to 'step one level back' and include the parent
directory of my current repo, so that the new repo will have the
current directory as a child, and all the sibling directories will
also become part of the repository.  What is the easiest way to
accomplish this while maintiaining my repository history?


I'm pretty sure you can do this with git-subtree. You can find it on  
github.  The basic steps would be to create a new repo for the top- 
level and then subtree-merge the existing history into a subdirectory.





Specifically, I have a directory 'abcd'.  Under that I have 'models',
'forms', 'pages'.  'Currently only 'pages' is in git.  Now I want
'abcd' and everything under it in git.

Thanks,

--
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-us...@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 
.




--
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-us...@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 Pull a different branch?

2010-09-24 Thread David Aguilar
On Fri, Sep 24, 2010 at 07:11:18PM -0700, David Zhu wrote:
 Hello!
 
 I have been pulling the next branch of FlightGear : http://gitorious.org/fg
 
 However, I would like to start getting the master branch, instead of
 the next, because it is more stable.
 
 Is there anyway to pull a different branch? I started with cloning/
 pulling the next branch, but now I want to pull the master branch.
 
 How would I go about doing this?
 
 Thank you


Well, you probably don't want to pull the master branch into
your next branch.  You probably want to checkout a clean
master and then start tracking that.

To do that it should be as simple as git checkout master.
From that point forward, git pull origin master should
keep you updated.

Is there anything I'm missing?

-- 

David


-- 
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-us...@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 migrate to git from two SVN repositories?

2010-09-07 Thread David Aguilar
On 9/6/10, Mark Kharitonov mark.kharito...@gmail.com wrote:
 @Rouleau: Thanks for the reply.

  Nope. I have two SVN repositories, where:
  - the first repository is the repository before the old VCS crashed.
  - the second repository contains all the dev code since the crash with
  the history starting from the crash day onwards.

  I wish to have a single GIT repository containing the merge of the two
  SVN repositories, so that the crash incident does not manifest itself
  in anyway. In other words, if a file is present in two SVN
  repositories, then it has two distinct histories - the one from its
  creation until the crash (in the first repo) and the other  - from the
  crash until now (in the new repo). I want this file to have a single
  history in the GIT, which is from its creation until now.

You should read up on grafts in git.

http://stackoverflow.com/questions/161928/what-are-git-info-grafts-for
https://git.wiki.kernel.org/index.php/GraftPoint


Merge in git parlance means something different then how you are
using it, which may be part of the confusion.  Once you've grafted the
histories together you should be able to filter-branch the graft point
away.  The basic idea is to start from two separate git repositories.
Go into the one with the post-crash history and graft the initial
commit so that its parent is the last commit from the pre-crash
history.  Once the graft is setup you can use filter-branch to make
the graft permanent.

In order to have the pre-crash history available in the post-crash
repo you'll need to add it as a remote to your post-crash repo.

git remote add old path/to/pre-crash
git fetch old

The pre-crash SHA1s will then become available from your post-crash
repo.  'git branch -a' will show its branches, etc.


  On Sep 5, 6:31 pm, P Rouleau proulea...@gmail.com wrote:
   I'm not an expert, but it looks like you now have two branches in SVN
   and you want to merge them back, but in git instead. And the hardest
   step will be finding the time to do it...
  
   I understand you want to keep the pre-crash history and the post-crash
   one too. I suggest these steps (look at the doc for the options'
   description):
   1. git svn clone [-s] -A {authors.lst} svn://pre-crash-svn mergeCrash
   2. git svn clone [-s] -A {authors.lst} svn://post-crash-svn postCrash
   3. cd mergeCrash
   4. git remote add postCrash ../postCrash
   5. git fetch [--tags] postCrash master
   6. git merge postCrash/master


I don't think this is what we are trying to accomplish.


   On Sep 5, 3:42 am, Mark Kharitonov mark.kharito...@gmail.com wrote:
  
Dear ladies and sirs.
  
We use SVN as our VCS, but wish to migrate to git. All is good, but a
few months ago our SVN server had a serious RAID problems (so much
that it became unusable) plus at the same day no IT person was
available to restore the repository from the backups. So, we have
setup a temporary SVN server on a certain workstation from the most
recent version that we had. The net result is:
  
   1. We have a few months of work on the temporary SVN server (the
revisions there start from 1, of course)
   2. There is a new VCS server machine with the pre-crash SVN
repository restored there, but no one uses it yet, because someone has
to merge the temporary repository there somehow and no one has the
time.
   3. In addition, we want to migrate to git, because SVN is just too
much pain to work with - merges are killing us.
  
Can anyone advice on the best process to end up with a git repository,
which would contain the old SVN repository merged with the temporary
one?
  
BTW, the new VCS server is a linux machine.
  
Thanks a lot in advance.

-- 
David

-- 
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-us...@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] getting a list of branches

2010-08-24 Thread David Aguilar

On Aug 24, 2010, at 11:24 AM, Ted cecinemapasdera...@gmail.com wrote:


Is there some way to specifically get a list of branches, without the
annotation that `git branch` normally adds?  I'd like to write a
script that loops over branches, but it shouldn't be dependent on the
presentation format.


$ git for-each-ref refs/heads

--
David

--
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-us...@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] 'v' prefix on version tags

2010-05-20 Thread David Aguilar
On Thu, May 06, 2010 at 01:51:53PM -0700, Trans wrote:
 I notice that almost every tagging example uses a version number with
 a prefixed 'v', e.g.
 
   $ tag -a -m first major point release v1.0.0
 
 I, on the other hand, have never bothered with 'v' prefix, and have
 always done, e.g.:
 
   $ tag -a -m first major point release 1.0.0
 
 Is there some reason to use the 'v' that I am unaware? Am I going to
 have issues on other platforms or something?
 
 Thanks.


Maybe not a huge deal, but you do lose the ability to do:

% git describe --match='v*'

It's just a convention, but not a bad one.  If you consider
that later you might imagine a new use for tags, then using
a convention today allows scripts to protect themselves by
only considering the v tags.

Many large projects use this convention, too.
Consistency never hurts, especially for mundane stuff
like tag naming ;-)

Cheers,

-- 
David


[1] - Maybe they all just copied Linus?

http://github.com/rails/rails/downloads
http://perl5.git.perl.org/perl.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-us...@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 do a diff comparing a file in your workin directory against a branch or a particular commit?

2010-03-17 Thread David Aguilar
On Wed, Mar 17, 2010 at 08:19:55AM -0700, vfclists wrote:
 Thanks.
 
 Is the viewer in question a console based graphics or a GUI based one?
 
 Will it work in an SSH terminal?


Both.  It's configurable.
The defaults ones are GUI based but you can easily configure
it to use something like 'vimdiff' which uses the console.

http://www.kernel.org/pub/software/scm/git/docs/git-difftool.html

http://stackoverflow.com/questions/255202/how-do-i-view-git-diff-output-with-visual-diff-program/949242#949242





 On Mar 17, 5:28 am, David Aguilar dav...@gmail.com wrote:
  On Tue, Mar 16, 2010 at 08:40:32AM -0400, Rick DeNatale wrote:
   On Tue, Mar 16, 2010 at 3:19 AM, vfclists vfcli...@googlemail.com wrote:
 
Is there a git command to compare a file in your working directory
against the same file in a branch or a particular commit?
 
   git diff example_branch -- path/to/file
 
   git diff cf3b3fd -- path/to/file
 
   --
   Rick DeNatale
 
  ...and if you use 'difftool' instead of 'diff'
  you'll see the diff in a graphical side-by-side
  viewer.
 
  Are you on Linux? (only asking because installing graphical
  diff tools is typically much easier on Linux than it is on Windows).
 
  Have fun,
 
  --
                  David
 
 -- 
 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-us...@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.
 

-- 
David

-- 
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-us...@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 with GIT

2010-02-09 Thread David Aguilar
On Wed, Feb 10, 2010 at 12:50:19AM -0300, stefano wrote:
  On Mon, Feb 08, 2010 at 07:37:02PM -0800, stefano wrote:
  I a n00b using GIT, i have some questions about how yo use git with
  two repositories
 
  I'm going to use cakephp (1.3 branch) . cakephp have is own repository
  in github.com (git://github.com/cakephp/cakephp1x.git)
 
  I need switch the branch to get the version 1.3 so this are my
  commands
 
  git clone git://github.com/cakephp/cakephp1x.git
  git branch --track 1.3 origin/1.3
  git checkout 1.3
 
  We this commands a got some folders like cake, app, vendors and some
  files index.php and .htaccess (in my root folder).
 
  In the folder app i have all my source. I wanna control this folder
  i my own git repository and snyc the folder cake with the info of
  cakephp's repository (in svn i use svn externals cake http://repository
  to do that but now i'm lost in git)
 
 [...]
 
 On Tue, Feb 9, 2010 at 2:09 PM, Petr Baudis pa...@ucw.cz wrote:
 
   What you are trying to do is not the usual mode of operation in Git;
  normally, the whole tree is always in a single repository. Please
  rethink if you really need multiple repositories.
 
 [...]
 
 Petr
 
 I wanna use multiple repositories only to get the last version of
 cakephp (they use github)
 
 S.

Hello

Stefano, please pay close attention to what you wrote:

 We this commands a got some folders like cake, app, vendors and some
 files index.php and .htaccess (in my root folder).

 In the folder app i have all my source. I wanna control this folder

This is not tenable, regardless of whether you use git or svn
externals.  You have an app directory, and so does the
upstream project.  If upstream didn't have this directory then
it'd be easier.  It would be possible if you made cakephp a
subdirectory of -your- project, not the other way around, which
lets you use submodules or git-subtree.  In any case, there's
always a way.

Now, pay close attention to what Petr wrote -- it was a very
subtle but important suggestion:

 What you are trying to do is not the usual mode of operation in Git;
 normally, the whole tree is always in a single repository. Please
 rethink if you really need multiple repositories.

You do not need a seperate repository.  What you need is a
separate branch for your stuff. e.g.:

-- o 1.3 -- o -- o -- o
\
 `-- o -- o -- o your_branch


All of your changes to the app/ directory happen in your branch.
Every so often you'll want to update with the latest to
upstream.  The easiest way to do this is to have a remote called
upstream pointing at github and periodically merge their stuff
into your branch..


git init
git remote add upstream git://servername/path.git
git fetch upstream
git reset --hard upstream/1.3

You now have something like this:

--o upstream/1.3
   \
`-- master

upstream/1.3 and master point at the same thing.
Now, you do some work in your app/ directory and make some
commits:

---o upstream/1.3
\
 `-- o -- o -- o master


Here's how you'd go about updating to the latest cake code.
First, fetch their stuff.  This will advance the upstream/1.3
branch.

git fetch upstream

---o -- o -- o -- o upstream/1.3
\
 `--- o -- o master

Now merge it into your branch.  This is where you'll resolve any
conflicts that may arise in the app/ directory.  This brings
your files up to date with upstream.

git merge upstream/1.3

---o -- o -- o -- o upstream/1.3
\  \
 `--- o -- o -- o - master

This is one of the simplest ways to do this given the structure
you described.  It's also superior in that you can do really
nice stuff like change the cakephp framework if you need to.

You can then do things like what did I change in foo?

git diff origin/1.3 -- foo.py

Branches are git's specialty so you'll gain a lot from doing
things this way.

-- 
David

-- 
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-us...@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.



[git-users] Re: git clone to existing folder

2009-11-01 Thread David Aguilar

On Sun, Nov 01, 2009 at 10:48:46AM -0800, Aljosa Mohorovic wrote:
 
 project root folder but i'm actually asking is there some technical
 reason why this is wrong and why i just can't clone a repository to
 current folder?

Why are you re-cloning every time?
The git way is to start your deployment from an initial git
checkout.

git clone git://your/htdocs.git htdocs

Then updates are simply:

cd htdocs  git pull origin master

Cloning every time isn't very efficient.


Is the initial project folder empty?
If so this'll clone into current the directory.

git init
git remote add origin URL
git fetch origin
git checkout -t origin/master

This can also be updated with git pull origin master.

-- 
David

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[git-users] Re: Git Diff GUI

2009-10-29 Thread David Aguilar

On Wed, Oct 28, 2009 at 11:04:27AM -0700, artem wrote:
 
 Hello! Tell me please if there some nice and usefull gui to make git
 diff between two commits. Is it possbile in Eclipse/egit or in any
 another gui tool? I did not found any way to do this yet.


git-cola: http://cola.tuxfamily.org/
There are several diff modes.
You can review branches, enter arbitrary diff expressions,
compare arbitrary commits, etc.

gitk: left-click on one commit, right-click on another and
choose one of the diff options.  This one has that nice
treeview that lets you choose commits from a tree.

Once you've chosen a diff option then you can right-click on one
of the filenames and choose external diff.


But.. if you just want a side-by-side diff, then what you really
want is 'git difftool'.

'git difftool' is packaged with git.
It accepts the same arguments as 'git diff'.

$ git difftool HEAD^
$ git difftool origin/master..mybranch

Here's the link to the docs.  Batteries are included
(it supports *lots* of 3rdparty merge/diff tools).

http://kernel.org/pub/software/scm/git-core/docs/git-difftool.html

Enjoy,

-- 
David

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[git-users] Re: Questions about git - don't read if you not want to answer newbie questions

2009-10-23 Thread David Aguilar

On Thu, Oct 22, 2009 at 01:12:51PM -0700, m.m-o.net wrote:
 
 I ll have to cooperate in a group with 3 other students and wanted to
 ask how to do so with git. Everyone working on his part of the project
 but how to put our works together? though Git is distributed - is


Take your pick:
https://github.com/
http://gitorious.org/
http://repo.or.cz/
etc.

-- 
David

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[git-users] Re: Is this possible with git

2009-09-25 Thread David Aguilar

On Thu, Sep 24, 2009 at 09:55:49AM -0700, Konstantin Khomoutov wrote:
 
 On Sep 23, 5:42 pm, Simon wrote:
 
  /base --  /common_dir1
 \  \  \ /common_dir2
  \  \   /site1
   \ /site2
 
  What I'd like to do is to be able to setup a repository to track all
  changes to /base, /common_dir1, /common_dir2  /site1 and another
  seperate repository to track /base, /common_dir1, /common_dir2  /
  site2.
 
 May be just create three repos: one for base + common_dir1 +
 common_dir2,
 and another two -- for sites?
 Then you could deploy each site like this:
 1) Clone common repository and get the base directory with common
 dirs.
 2) Clone the site repository under the base directory.
 3) Add the just created site directory to the .gitignore site located
 under /base.


This sounds a little complex.

Perhaps the git way would be to have a base master branch
and N number of long-lived site specific topic branches.

You'd probably need to rework the directory structure
to make it so that each site has a completely self-contained
tree.  They can't share common files (so there'll be
duplicate files on disk) but disk space is cheap
compared to the convenience it buys you.

Keep a different checkout (on a different branch) for
each site.  It's simple, and you can still have them all
pointing to the same shared repo for pushing changes back
(each site pushes to a different branch, of course).

Keep the common and site-specific parts in different
directories.  Then it'll be easier to know that changes
to them should happen in different commits.

Changes to the common part should ideally happen on the
common master branch.  This branch gets merged into
the site branches as needed.

The beauty of it is that when you do happen to
accidentally commit to the wrong branch you can always
cherry pick that commit onto master -- just remember
to make changes to site and common in different commits.


 The compilcation is that whenever you modify both common files and
 site-specific files during one unit of work, you will need to commit
 (and push) updates separately in each repository. But as I understand
 submodules, they would require essentialy the same approach.

The approach I described doesn't remove the need to be atomic
in your changes to common and site, but it does let you do
without having to create a new repo everytime a new site
comes around.  In my scheme new sites correspond to new
branches, and branches are cheap.

Another win from doing it this way is that you can easily
compare sites from anywhere.

e.g. from site1:

$ git fetch origin
$ git diff origin/site2


Have fun,

-- 

David



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[git-users] Re: git diff with external

2009-09-21 Thread David Aguilar

On Mon, Sep 21, 2009 at 06:50:29AM -0700, Jeffrey wrote:
 
 For your specific question, I'm not sure there's a way.  It's not
 something that could be solved with gitattributes, is it?  That'd let
 you use external diff on a subset of files.  Otherwise, I'd suggest
 just making some aliases, something like:
 
 df = diff --no-ext-diff
 dfe = diff --ext-diff

It can be solved if you use git-difftool instead.

It's fairly new to git (1.6.3+) and will allow you to get
rid of your custom diff.external script.

There's no reason for it.  Did you pick that up from the
progit book?  I still need to send Scott a patch.

http://article.gmane.org/gmane.comp.version-control.git/124225


-- 

David



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[git-users] Re: Git upgrade on a Mac

2009-03-12 Thread David Aguilar

On  0, Ken kohud...@gmail.com wrote:
 
 Hello,
 
 I have Git version 1.5.5.3 installed on my Mac.  It's been there
 awhile and to be honest I'm not really sure what specific method I
 used for an install (I know dumb mistake).  Anyway, I would like to
 upgrade to the latest version.  What would be the best method for
 doing this?  (I noticed on another thread the suggestion for
 uninstalling git prior to installing the new version.  Unfortunately,
 there was a follow-up response to that suggestion that was never
 answered so I'm uncertain how to proceed.)
 
 Thanks very much,
 
 Ken

Yes, you should uninstall the git you currently have by using
'make uninstall'.  After you've done that, download the
latest code and install it.

It's important that you use the git 1.5.x code to uninstall
it since that's the version that you installed initially.

If you have trouble uninstalling then you can probably cheat
and simply:

$ ls $(which git)-*
$ rm $(which git)-*

prior to your new install.


Have fun,

-- 

David



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---