[git-users] Re: Copy files between local branches.

2009-09-15 Thread Konstantin Khomoutov

On Sep 15, 4:23 pm, Marcello Henrique fara...@gmail.com wrote:
 Is possible copy files between local branches, for example:

 marce...@itacellus:/var/www/moodle-git$ git branch -a
   UFG_18
 * UFG_19
   remotes/origin/HEAD - origin/UFG_18
   remotes/origin/UFG_18
   remotes/origin/UFG_19

 I want copy in file system from branch UFG_18 to UFG_19, because we 18
 and 19 is versions and different codes.
 I try doing clone two times from different directories, and copy from
 them, but I think this is not the right way.

I cannot quite parse what you wrote; I understood this as you want to
copy a file from the tip of another branch to the working directory.

To do this you use `git show TREEISH:path/to/file path/to/local/file`
where TREEISH is anything pointing to a tree: the name (hash) of a
commit, a tag, a branch name etc.
For instance, if you want to replace the file foo.c in the working
directory with the contents of the same file as found at the tip of a
non-current branch UFG_18, you can use `git show UFG_18:foo.c foo.c`.
If you want the contents of that file as found in some previous commit
made on the branch UFG_18, you first get the name of that commit (by
studying the output of `git log UFG_18` for instance) and then use
that commit name in place of the branch name with `git show`.

Read git-rev-parse manual page for details.
--~--~-~--~~~---~--~~
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: Add files upstream

2009-09-24 Thread Konstantin Khomoutov

On Sep 24, 9:01 am, Jeenu jee...@gmail.com wrote:

 I mainly use git at work for tracking my own stuff, with no intent of
 collaboration. I usually have huge directories to track, and when I
 start out, I do so with very minimal stuff which I think would
 suffice. Later, while I proceed through different branches, I realize
 that I'm going to change something that's not tracked yet; and that
 I've to track in my future branches.

 I could start tracking that to my current branch, and all the branches
 that I create. But I wish I was added upstream so that's trackable on
 all my existing branches. So is there a way to achieve that? I know of
 filter-branch, and that it's going to be expensive on both time and
 disk, but not quite sure of how to use it in this case. Are there any
 better alternatives?

You could commit the necessary change on one branch then switch to
every other branch in turn and `git cherry-pick` that change from the
original branch.
This won't place the change down the tree of commits, of course, but
this approach is non-destructive in the sense it doesn't imply history
rewriting.

If, on the other hand, you're OK with history rewriting (for instance,
you don't publish your branches), you supposedly can do this:
1) Commit the change on one branch;
2) Do rebasing of this branch so that the committed change appears
after some specific commit in the branch history (supposedly it should
be some commit earlier than the common ancestor of all the branches
interested in the change you just made).
3) Rebase the rest of the branches on top of that new commit
containing the change.
I suppose this approach should be a bit less cumbersome than git-
filter-branch.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en
-~--~~~~--~~--~--~---



[git-users] Re: Comment commits using accents

2009-10-19 Thread Konstantin Khomoutov

On Oct 19, 3:44 pm, Paulo Cassiano pcassi...@gmail.com wrote:

 I'm using Git temporarily in a Windows Vista machine and trying to
 comment my commits in portuguese, using accents, but my console
 doesn't show my comments properly...

 I've tried to change my console encoding from default to UTF-8 or to
 1251(2), but the problem persist...

 How could I fix this?
For unknown reason Git was not made to work with user's locale
codeset,
and it assumes you feed it with UTF-8 on any platform.
To make it use ISO-8859-1, which is used for Portuguese, as I
understand,
you have to manually set the commit encoding for your repository,
like this:

git config i18n.commitencoding iso-8859-1

This will match the Windows-1252 encoding which is supposedly the code
page for your locale. Setting i18n.commitencoding to windows-1252
should also work by the way.

Note that if you're sharing this repository with anyone else, they're
all supposed to perform the same configuration step on their local
copy of the repository, as now all commit messages will be encoded in
iso-8859-1.

Refer to git-show man page for more details (run `git help show`).
--~--~-~--~~~---~--~~
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: Comment commits using accents

2009-10-22 Thread Konstantin Khomoutov

On Oct 20, 3:50 pm, Paulo Cassiano pcassi...@gmail.com wrote:

 I tryed to set the i18n as you ask me to do, but doesn't work... My
 DOS prompt shows me characters like E1E7... F4 in the accents
 place...

 Now I'll try to set a default editor. I hope this works for me.
[...]

Oh, and there can also be a problem with `less`, if it's used as a
pager in the console. I use an old like dirt hack to make it have no
problems with Cyrillic characters -- creating the LESSCHARSET
environment variable set to koi8-r. This won't work for you, so
probably try to employ another hack with setting pager=less -FRX as
Michael P. Soulier suggested earlier in this thread -- it might fix
your problem.
--~--~-~--~~~---~--~~
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 Konstantin Khomoutov

On Oct 23, 12:12 am, m.m-o.net googlegoo.4.red...@a-bc.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
 there a easy way to use a common repo where everyone puts selective
 changes to? Or if I am totally wrong tell me how we can handle our
 situation the best way?

http://progit.org/book/ch5-0.html

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



[git-users] Re: Send local branch changes to remote branch

2009-11-12 Thread Konstantin Khomoutov
On 12 ноя, 17:09, apm korja...@gmail.com wrote:

  The simple answer: you can't really modify origin/master locally.
  Jeffrey
To further augment what Jeffrey said --
if you don't want the wrongly committed changes to get lost,
then, while on that detached HEAD, do
  git tag mywork
to tag the commit at that detached HEAD, then go back
to your real tree, say, by
  git checkout master
and see what changes your tree misses compared to that
wrongly started line of development:
  git log ..mywork
Now you have a list of commits which you want to appear
in your working branch. To do this, just do
  git merge mywork
followed by
  git tag -d mywork
(to get rid of now useless tag).

--

You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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=.




[git-users] Re: git const branch

2009-11-27 Thread Konstantin Khomoutov
On Nov 26, 11:23 am, itroot ivan.tolstoshe...@gmail.com wrote:

 Some branches in git are tracking another branches (for example,
 usually master tracks origin/master). Let's assume, that in my work-
 flow i don't want accidentally commit in master, but i want master to
 track origin/master. I release that i can do this with hooks, but this
 solution seems to me complicated.

 Can i make some git branches const?

I think you can not, but until you have pushed the branch with wrongly
applied commits
you can easily revert these wrong changes using `git reset --
hard ...`,
so the absence of immutable branches is not a big loss.

On the other hand, Git already includes certain things which are there
mostly
for convenience, so why not.
In either case, you should suggest your idea on the official Git
mailing list, not here.

--

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 const branch

2009-11-27 Thread Konstantin Khomoutov
On Nov 27, 9:51 pm, Rick DeNatale rick.denat...@gmail.com wrote:

 Some branches in git are tracking another branches (for example,
 usually master tracks origin/master). Let's assume, that in my work-
 flow i don't want accidentally commit in master, but i want master to
 track origin/master. I release that i can do this with hooks, but this
 solution seems to me complicated.
 Can i make some git branches const?
[...]
 I think that by definition a branch is a movable pointer to a commit,
 so a const branch is a bit of an oxymoron.

 The concept for a fixed pointer to a commit is called a tag.  If I
 want to mark a point I might want to get back to, such as the commit
 corresponding to a current release, the I tag it and push the tag.

Good point, but there's one exception: you can't fast forward a tag,
while this is often the sole reason for the existance of the master
branch
as a mirror of origin/master.
But then again, to fast forward a branch it must not be immutable ;-)

--

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 const branch

2009-11-27 Thread Konstantin Khomoutov
On Nov 27, 10:25 pm, Rick DeNatale rick.denat...@gmail.com wrote:

 The concept for a fixed pointer to a commit is called a tag.  If I
 want to mark a point I might want to get back to, such as the commit
 corresponding to a current release, the I tag it and push the tag.
 Good point, but there's one exception: you can't fast forward a tag,
 while this is often the sole reason for the existance of the master
 branch
 as a mirror of origin/master.
 But then again, to fast forward a branch it must not be immutable ;-)
 You can't fast forward, or merge to, a tag because it is a constant
 pointer to a given commit.  Which is what the OP seemed to be asking
 for.
 Q.E.D.

Correct, but I was referring to periodical fast-forwarding master
from the branch it's tracking to follow upstream development,
which is quite common.

--

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: how to organize a repository for a shared-template system?

2009-11-30 Thread Konstantin Khomoutov
On Nov 30, 12:31 pm, Orava petri.m.wess...@gmail.com wrote:

First of all, I recommend reading the relevant part of the Pro Git
book [1].

[...]

 - All the code will live in a central remote repository or
 repositories. I'll check out (pull) code changes to my actual
 working copy repositories (on laptop or desktop) as needed, and push
 back changes periodically.

1) Setup bare remote repository, add it as the remote repository
  to the configuration of your local repository. It might be sensible
  to name it origin -- this will simplify mental difficulties of
translating
  various tutorials to your own setup.

2) Create any number of local trees (it seems that for now you need
exactly
 one of them -- for your template code).

3) Push local trees to the remote side (`git push --mirror`), fetch
them back
  (`git fetch`), make your local trees track remote trees you have
just fetched.

Then you can work as if you cloned the remote repository.

 - I want to have a code template which I will use as the base for all
 new projects (it's Ruby on Rails code). That template will exists as a
 project of its own, and will contain shared functionality I want in
 all projects; user management, authentication, etc.
 - As noted, new projects will start off with a copy of the template,
 but then evolve into whatever app they need to be. Changes made to the
 app will generally only go into the app codebase, not the template.
 - *But* I also want to be able to merge in changes from the template
 at times (for example, if I change/fix the authentication code I want
 those changes propagated to all the apps too).

All you need to do is to fork each of your projects off the tree you
hold
your template in.
Re-integration of the changes made into the template tree is done
using simple merging via `git merge`.

P.S.
Junio C Hamano recently made a post on the philosophy of merging
which is a more pleasing to read than books or tutorials [2].
You might find it interesting.

1. http://progit.org/book/ch5-0.html
2. http://gitster.livejournal.com/42247.html

--

You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Sync-ing repositories

2009-12-04 Thread Konstantin Khomoutov
On Dec 1, 2:34 pm, Roddie Grant rod...@myword.co.uk wrote:

 I develop a website on my laptop, in a Git repository. On the staging server
 (for testing) there is another repository. From time to time I push from the
 development repository to the server repository, and then git merge
 dev/master on the server.

 I'm fairly new to Git, but this has worked well. But last night I must have
 done something wrong (I'm sure it was operator error) but in two minutes I
 ended up with two blatantly different repositories, with both the push and
 the merge saying Up to date, even though the server still had older
 versions of files.
[...]

I'm not sure, but may be your issue is described in [1] which
references [2],
and can be classified as a violation of the never push into a
repository that has
a work tree attached to it, until you know what you are doing rule?

1. 
http://www.gitready.com/advanced/2009/02/01/push-to-only-bare-repositories.html
2. 
http://git.or.cz/gitwiki/GitFaq#Whywon.27tIseechangesintheremoterepoafter.22gitpush.22.3F

--

You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: list files under tag ???

2009-12-12 Thread Konstantin Khomoutov
On Dec 12, 11:04 am, SCM Admin ccadmin...@gmail.com wrote:

 Just one more thing to add here. How do i tag the whole content inside my
 branch? As paul said, if i do 10 commits only the final commit will be
 tagged. Now for example if i will branch-off from the master branch and
 start work from there and i want to give a final tag on the branch what i am
 working till now. Is it possible in GIT ?

This is not needed. Here's why: each commit in a repository managed by
Git
knows its immediate parent commit(s) -- one for simple changeset and
two or more for commits resulted from merging.
Hence, if you khow the name of any commit in the history, you can
easily
trace the full history of changes that commit resulted from.

Now let me guess about why you asked...
Note that Git it radically different from, say, Subversion in that you
do
not usually operate on changesets (well, in 1.5.x Subversion moved a
bit
in the same direction as Git though), that is, merging developments
made on a branch back to the trunk do not require you to find out
where
your branch forked off, you just do
$ git checkout master
$ git merge mybranch
and Git figures out all by itself what to merge to make master have
all the
changes made in the mybranch (compared to master).

To get more familiar with concepts in Git, consider reading [1] (and
the material
it refers to) and [2].

 Also how do i see the content inside a commit? if i run git log  it just
 shows the commit id and the author.
Did you read git log manual page at all?
try running `git help log`.
Also using some GUI tool might help, try gitk for instance.

1. http://tom.preston-werner.com/2009/05/19/the-git-parable.html
2. http://progit.org/

--

You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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 on windows ...

2009-12-14 Thread Konstantin Khomoutov
On Dec 13, 7:39 pm, Mark Rosenberg markrosenberg01460...@gmail.com
wrote:
 There appear to be several options with respect to GIT clients, UIs,
 etc for use on the Windows XP platform. As someone about to start
 using GIT, I'd appreciate learning from this form which of the various
 options are best (and worst).
Use msysgit [1] -- it contains most of the usual Git tools and is
native (that is, does not require installation and maintenance of
Cygwin).
As it is constantly evolving, it is recommended to grab the latest
(beta) version.
Before starting, be sure to read the provided README file and check
the wiki.
This is because the impedance mismatch between POSIX and Windows
is way too high in some cases and making certain things work requires
performing certain documented tricks.

Msysgit has at least two conventional GUI tools packaged: gitk and
git-gui.
It's enough for the most typical usage scenario.
If you need Explorer integration, check TortoiseGit [2] and Git
Extensions [3].
There is also Git Cheetah [4] -- a GUI tool from msysgit folks aimed
at
cross-platform (!) integration to different file managers (including
Explorer on Windows), but I'm not sure it's production-grade quality
already.

Also beware of these cross-platform interoperability issues:
* There's no way to reliably manage files with non-ASCII filenames
  across diffrent platforms (Windows and POSIX).
* If you intend to use non-ASCII characters in your commit messages,
  be sure to read the relevant section of the git-log manual page,
  pick a suitable strategy to cope with the problem and and tune
  your setup accordingly.

1. http://msysgit.googlecode.com
2. http://code.google.com/p/tortoisegit/
3. http://code.google.com/p/gitextensions/
4. http://code.google.com/p/msysgit/wiki/GitCheetah

--

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 as database

2009-12-17 Thread Konstantin Khomoutov
On Dec 17, 5:31 pm, Rick DeNatale rick.denat...@gmail.com wrote:

[...]
 One example is a wiki.  Ward Cunningham's original wiki used (probably
 still uses) the file system to save the wiki pages, and relied on
 users to manually weed out unwanted changes.  Wikipedia uses a complex
 relational database to save wiki pages and provide version control.
 Building a wiki on git would seem to be a fairly natural idea, but I
 don't think that the interface between the app and git would look like
 a relational db api.

That's what ikiwiki [1] and gitit [2] do. There may be others as well.

1. http://ikiwiki.info/
2. http://hackage.haskell.org/package/gitit

--

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: using two git branches at the same time

2009-12-23 Thread Konstantin Khomoutov
On Dec 23, 1:01 am, Nigel Noldsworth noldswo...@googlemail.com
wrote:

 I have a big project. I would like to evaluate another simulator
 against the one I'm using.

 Hence I would like to know whether I can create git branches

 * design
 * simulator1
 * simulator2

  and use two branches at the same time, where branch design will be
 common to the rest.

 The branch design will have project materials.
 The branch simulator1 will contain only files to use sources from
 branch design.
 The branch simulator2 will contain only files to use sources from
 branch design.

I completely fail to understand what do you mean by using at the same
time. You surely can have any number of branches to exist at any
given time, as a branch is nothing more than a file in your repository
which contains a name of the tip commit on that branch.

If you, on the other hand, ask whether you can have more than one
branch *checked out* at the same time, that is, whether you can have
several working trees (or working directories or whatever wording you
prefer) for the same repository at the same time, then the answer is
no. If this is what you actually wanted to ask, you can sort of work
around the issue by cloning the original repository to another
directory on the same filesystem (possibly using shallow cloning, see
--depth command-line option to git-clone): when you use bare directory
names when cloning, Git will try to use hardlinking. After testing you
can just remove the whole cloned repository.

If you still need full support for several parallel checkouts, look
at Bazaar.

--

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: Using Git to bisect Wine

2009-12-27 Thread Konstantin Khomoutov
On Dec 28, 2:29 am, fester225 fester...@gmail.com wrote:

 I'm attempting to use Git (1.6.3.3) to bisect Wine.
 When I ran: git bisect start, I got: fatal: invalid reference: master.

 How do I get rid of the error?

What does `git branch` show to 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-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: Sync with a Master

2010-01-06 Thread Konstantin Khomoutov
On Wed, Jan 06, 2010 at 06:34:37AM -0800, Trans wrote:

 So I've cloned a repo, which is a fork of another repo. If I want to
 update my repo to match the original (and ditch any changes I may have
 made), how do I do it?

 Did you follow any workflow guidelines and make your changes on separate
 branches from master? If not your simplest option is to delete your cloned
 repo and reclone it.
 
 I am using github. So I have my own fork. So it's more involved then
 that. I would have to delete my fork, then refork it and then reclone
 it. I was hoping for a simple way to update my repo without having to
 do all that.
I've just forked my friend's project on github, checked it out,
and it seems that the forked repo is not really tied to the repo
it was forked off: there's just one remote, origin, which is
my forked repo.
So I think you have two ways to solve your problem:
1) Dumb but simple: just re-fork.
2) Smart but complicated:
   a) Add original repo, which you forked, as a second remote to your
  repo: just grab its read-only URL and do `git remote add ...`
  with that URL.
   b) Fetch the branches and necessary objects from that remote
  using `git fetch REMOTE`.
   c) Re-create your local branches from the matching branches from
  that remote (this would require some branch renaming and
  creation using `git branch ...`).
   d) Re-write matching branches in your forked remote branches
  using `git push ...` with the -f command-line option.

 Otherwise, just delete the branches you no longer need and pull changes from
 upstream master to yours. This won't sync other branches from upstream but 
 you
 can make that happen too, especially if you made them tracking branches.

 I think you have some reading to do...
 Too much reading... and I've already had to read too much as far as I
 am concerned.
That's quite impolite, you know.
We're not your personal paid tech support so better make these statements
to yourself, privately.

-- 
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: Sync with a Master

2010-01-06 Thread Konstantin Khomoutov
On Wed, Jan 06, 2010 at 06:34:37AM -0800, Trans wrote:
[...]
 I am using github. So I have my own fork. So it's more involved then
 that. I would have to delete my fork, then refork it and then reclone
 it. I was hoping for a simple way to update my repo without having to
 do all that.
Correction: (2.d) in my reply should read as
Re-write matching branches in your forked remote repository using
`git push ...` with the -f command-line option.

The idea is that after you have replaced your local branches with
the branches from the newly added remote repository, you'll have
you hard reset these branches in your original remote repository
(which contains the fork).

-- 
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: clone to local directory

2010-01-19 Thread Konstantin Khomoutov
On Jan 18, 2:42 am, Vincent P ease...@gmail.com wrote:

 I follow the instructions below to set up a git repository with
 gitosis on my home ubuntu server.  I can connect to the repository
 remotely perfectly and set up a new repository named My_Project.  I
 successfully push the content of My_Project to this repository using
 the remote computer with an SSH key.  Now I want to clone My_Project
 locally onto another directory within the unbuntu server.  How can I
 do this?  The instructions are only to clone remotely.  It appears
 that the clone command allows an local option but I haven't been
 able to get it to work.

git clone /path/to/the/repo
or
git clone file:///path/to/the/repo

The first will try to hardlink everything possible, the second will
not.
See `git help clone`.
-- 
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: User Restrictions....

2010-01-21 Thread Konstantin Khomoutov
On Jan 21, 10:23 pm, Jeffda daniel.viviot...@gmail.com wrote:

 Is it possible to allow commit, or patch apply, permissions for a
 user, but only if they aren't the ones that made the modification? For
 instance, if someone submits a patch to the user, the user will be
 able to apply the patch; however, if the user creates a patch, the
 user shouldn't have the ability to apply the patch. Is this possible
 with GIT?

I have no idea about why you would need such a puzzling requiement for
your setup, but it seems the way to go (wich will work only if your
users are below certain level of incompetence) is to create your own
wrapper on top of Git (or even a GUI tool) which would: a) allow only
a limited subset of operations; b) check input data for them. Note
that while working with such a wrapper, the user should not ever
notice it is dealing with Git; otherwise inventing such contraptions
is futile.
-- 
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: get to a branch from another computer

2010-02-13 Thread Konstantin Khomoutov
On Feb 13, 2:49 am, Vincent P ease...@gmail.com wrote:
 How do I get to a branch from another computer?

 Say: I have a branch experiment on laptop A.  I've committed it and
 pushed it to the repo.  Now I go to laptop B, I clone the repo.  The
 only branch I see on laptop B is master.  How can get to the
 experiment branch from laptop B?

Sure, because `git clone` essentially does `git fetch` + `git checkout
-b master origin/master` unless this behaviour modified by command-
line options.
Cloning does not automatically create tracking local branches for any
fetched remote branches.
So you just have to do something like
git branch experimental origin/experimental
git checkout experimental
or, in one step,
git checkout -b experimental origin/experimental

To see what remote branches your local repository knows use
git branch -r

All branches (local and remote) can be viewed using
git branch -a

You can also use
git remote show origin
to view disposition of local branches with regard to remote ones (when
offline, add -n option to not contact the remote repository).

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Does tagging automatically create a commit?

2010-03-11 Thread Konstantin Khomoutov
On Mar 11, 2:07 pm, vfclists vfcli...@googlemail.com wrote:

 Does tagging automatically create a commit, or does it apply to the
 latest commit?
There are two kinds of tags: simple tags and annotated tags.
Simple tag just names a commit while an annotated tag is a blob which
contains a message, references a commit it is attached to, and can be
signed.
In any case, neither of this kinds of tag creates a commit in the
sense of moving a branch tip.

Also tags can be attached to any object stored by Git, not only
commits, and when a tag is applied to a commit object, it can be any
commit object, not necessarily the tip of a branch.

For instance, you can put a detached file in the Git DB and tag it
to later access it by convenient name:
$ NAME=`git hash-object -w myfile.txt`
$ git tag myfile-tag $NAME
and then later you can do
$ git show myfile-tag myfile.txt

-- 
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: Getting a branch's time of creation

2010-03-18 Thread Konstantin Khomoutov
On Mar 17, 4:40 pm, jayman jawad.a...@gmail.com wrote:

 I am trying to find the time at which a remote branch was created, so
 that I can use the '--since' option in git log to limit the commits to
 only ones that were created for that branch (read below to see why I
 can't use 'git log branchnname). So my question: does git remember
 the time at which a branch was created, and how can it be listed?

Impossible. A branch is merely a file which has the name of the tip
commit written into it.

 NOTE: Once I clone a repository that contains Branch1 (which will have
 its own commits as well as commits from the master branch), I create
 Branch2 in the clone to track Branch1. Branch1 will have commits
 before the cloning, and Branch2 will have its own commits after the
 cloning, but I want to list both. The way I am thinking of doing it is
 to list all commits for Branch2, and then limit the commits to only
 ones that were created after Branch1 was created.

Unfortunately, I failed to reliably parse this, so I'll make two
guesses:

1) You have a branch Branch2 which has been forked from Branch1
and accumulated several commits since then, and you want to see all
the commits made on Branch2 but not those made on Branch1 before the
fork.
You then need
$ git log Branch2 ^Branch1
in this case. Or, alternatively,
$ git log Branch1..Branch2

See the SPECIFYING REVISIONS section of the git-rev-parse manual.

2) You have a branch Branch2 which has been forked from Branch1
and accumulated several commits since then, and you want to see
everything on Branch2, including commits on Branch1, but only until
the commit which was at the top of Branch1 at the time you cloned the
repo.
You then need to tag your branch immediately after cloning the repo to
make a persistent pointer to that branch's tip commit at the time of
cloning. You will then be able to use that tag to set the limit for
`git log` (see the first case above on how to limit).

-- 
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: Does git have some kind of logging or verbose format?

2010-03-21 Thread Konstantin Khomoutov
On Mar 20, 9:51 pm, vfclists vfcli...@googlemail.com wrote:

 I keep getting

 Fatal: The remote end hung up unexpectedly

 and would like to know if there is a way to get git to give more
 detail on what is going run, like some verbosity level both on the
 server as well as locally,

 ls -l /var/log/git doesn't seem to exist.

I don't know how to increase the logging level on the client, but I
want to give some hints.

First, if you're trying to use the SSH transport, the whole thing
works like this:
1) The client part logs in to the remote machine using SSH and spawns
the git-receive-pack binary on the remote.
2) The git-send-pack on the client side is then spawned and these two
binaries communicate over the SSH link.
Hence, several problems may arise in this scenario:
1) You fail to authenticate properly -- check /var/log/auth.log (or
whatever it is on your server side). Also try to log in to the remote
side using plain SSH client.
2) Authentication goes OK but git-receive-pack fails to start (not on
the PATH of your remote account for instance). You can check it by
trying to run it while being logged in as a regular user via SSH.
3) The steps above work OK but the path to the repositiry you
specified does not exist or is unreadable or something like this.
Double check this.

Second, if you're trying to use msysgit from the Windows box, you may
have additional troubles with authentication.
As you provided exactly zero amount of information about your setup, I
won't be guessing.

-- 
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: set author on all commits?

2010-03-21 Thread Konstantin Khomoutov
On Mar 19, 10:00 pm, Cliff clifford.me...@gmail.com wrote:

 I recently imported some svn repositories into git and noticed that I
 have no author or committer set.  At first I thought this might be
 because of how I imported it it, but going back to look at the svn
 tree (it was just for personal use) I see that there were no authors
 set there either.

 Is there an easy way to just set all the commit history in my new,
 cloned, git repository to a single author (me) ?

Subversion commits do have an author assotiated with them as far as I
know.
The problem is that Git uses another approach (better) for this and
when importing a Subversion repository you have to arrange for proper
mapping.
So, if you don't mind re-importing these repositories read the git-svn-
fetch manual about the --authors-file or --authors-prog options; also
see [1] which contains a detailed explanation (if you want to
*convert* an svn repo to Git as opposed to just synchronize them, you
will also probably want to convert certain remote branches git-svn-
fetch creates to git tags and normal local branches; than guide
explains this).

1. http://wiki.debian.org/Alioth/Git#ConvertaSVNAliothrepositorytoGit

-- 
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: merge exactly one file ?

2010-03-22 Thread Konstantin Khomoutov
On Mar 22, 11:23 am, apm korja...@gmail.com wrote:

 How its possible do something like git diff second_branch -- shared_file
 for merge?

 Another words , how merge exactly one file from different branches?

You can possibly feed the output of that command to `git apply` or
`git am`.
Note that this won't be a merge in its true sense as merging either
results in fast-forward update or records a special commit which
references both (or more) lines of history which had been merged.
If you want to really merge but zap all the changes resulting from
the merger except those made to one file, you can use the --no-commit
to the merge command and then reset unwanted changes and commit.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Meaning of 'HEAD' vs. branch master

2010-03-22 Thread Konstantin Khomoutov
On Mar 22, 6:26 pm, Pito Salas r...@salas.com wrote:

[...]
 So, there's one HEAD per repository, not one per branch, correct?

Possibly it helps to note that this HEAD is not an abstract
concept like in Subversion or Mercurial.
HEAD is just a one-line text file under the .git directory which
contains the name of the commit on which your working directory is
based (or the tip of the current branch for remote repo, in which
hase its point is somewhat moot).
This file is updated each time you change the commit on which your
working directory is based. This includes making a new commit and
checking out some existing commit.
Hence, the HEAD is one per repository -- it just marks the point of
where you are currently working at.
Don't confuse this with Mercurial's idea of heads: Git's heads are
almost always (well, always) named.

-- 
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: Is it safe to rebase changes I have pushed?

2010-03-26 Thread Konstantin Khomoutov
On Mar 25, 9:37 pm, Charles Manning mannin...@actrix.gen.nz wrote:

 Due to my git noobness I ended up putting some changes in the wrong commit and
 then pushed.

 I would like to rebase to fix up the commit messages. Will I break things if I
 then push the resulting commits?

It solely depends on whether the branch you have pushed to is tracked
by other people or not. If it is, it will certainly break things for
those people. If that branch is just yours for any reason, you can
do whatever you want with it.

In short, it's more a political question rather than technical.
Sometimes it's better to replace a branch in the shared repo having
discussed this move and its outcome with all the developers who share
the repo.

-- 
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: Does git have some kind of logging or verbose format?

2010-03-26 Thread Konstantin Khomoutov
On Mar 22, 4:57 pm, vfclists vfcli...@googlemail.com wrote:

   I keep getting
   Fatal: The remote end hung up unexpectedly
   and would like to know if there is a way to get git to give more
   detail on what is going run, like some verbosity level both on the
   server as well as locally,
[...]
 My system consists of msysgit and TortoiseGit.
 I setup the key using msysgit's ssh-keygen and Tortoise is able to
 work with it fine.
 I am not using the putty/plink system with msysgit.
[...]
All output seems OK to me so I don't really know what to do next as I
use putty suite myself.
One thing which could probably shed some light on your issue is to
enable git tracing before trying the offending command; try
something like this:

C:\repo set GIT_TRACE=1
C:\repo git remote show origin

And see what it prints.

-- 
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: Does git have some kind of logging or verbose format?

2010-03-31 Thread Konstantin Khomoutov
On Mar 31, 5:25 pm, vfclists vfcli...@googlemail.com wrote:

[...]
  When I try you suggestion, a message suggesting it is using plink to
  connect, yet the ssh command works fine.
  When I try to generate a key it also complains that the id_rsa file
  already exists. It looks like although it was through Git I set up the
  ssh key, it is expecting the file to be converted for use with plink
  before it works.
  I think I will create a putty connection for the username/server and
  get the key converted and stored in it. That might work.

 Creating a putty session with for the git user on the server, saving
 the user name and adding the ppk to it solved the problem. It looks
 like TortoiseGit uses the id_rsa key, where as msysGit doesn't, as it
 probably expects a putty session with a username and saved .ppk key to
 already exist for use by plink.

I think the truth is that msysgit can be configured in different ways
while being set up.
As I extensively use putty for conrolling my Linux machines, I did not
explore the other means msysgit can use to talk with the servers.

You might find it useful to try another approach to msysgit+plink:
putty comes with a tool called pageant which is a SSH agent, that
is, you supply it with one or more private SSH keys, it asks for
passphrases for them and caches these passphrases.
So I use it like this: after logging in, I start a script which spawns
pageant with my ppk key, enter the password and then pageant just sits
in the tray.
Whenever I talk to a sevrer, plink picks the (decrypted) key from
pageant and logs to the server using it. This is hence convenient as I
only have to type my passphrase once per (windows) session. I find it
more usable than creating a specialized session in putty with a key
attached.

Also I think it worth noting that TortoiseGit is a project completely
separated from msysgit; instead, msysgit folks are working on their
own shell-integrated extension called Git Cheetah (it also integrates
to Nautilus on GNOME desktop). Its development appeared to be
stagnated for some time, but the latest preview bundle of msysgit
includes its working version, so you could try it out -- may be it
integrates more nicely with msysgit.

In any case, both msysgit and tortoisegit communities have their own
mailing lists -- if you have any issues with these pieces of software,
it's probably more appropriate to direct such kind of questions there.

-- 
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: How to exclude branches from git push?

2010-03-31 Thread Konstantin Khomoutov
On Mar 31, 11:31 pm, vfclists vfcli...@googlemail.com wrote:
 When I run 'git remote show origin' the output states that a git push/
 pull/fetch will fetch and push a number of branches on the remote.

 Is there a way to push only a particular branch and ignore the others?

Yes, see the git-config manual and search for the push.default
option.

 The git branch docs show this example.
 ***
 Delete an unneeded branch

     $ git clone git://git.kernel.org/.../git.git my.git
     $ cd my.git
     $ git branch -d -r origin/todo origin/html origin/man   (1)
 ***

 Does the 'git branch -d -r' option delete the local copies of the
 remote branches, or the remote copies?

 If I were to apply them without the origin prefix would it delete just
 the local ones?

Yes to both questions. Note that origin is not prefix, it's the
name of an actual directory under .git.
To get a better grasp of this topic, read the SPECIFYING REVISIONS
section of the git-rev-parse manual page.

Also I'd like to amend what Marek said: I noticed people get confused
by the convention used to delete objects in remote repositories
(that `git push remote_name :remote_object` thing).
The idea is that in the full form used for pushing rather than
deletion you use this command like this:
$ git push remote_name local_object:remote_object
and so for deletion you push nothing to a specific remote object.
Thinking this way possibly gives the deletion form of this command
more sense.

-- 
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: How do you exclude files from being merged by git pull, push etc?

2010-03-31 Thread Konstantin Khomoutov
On Mar 31, 6:07 pm, vfclists vfcli...@googlemail.com wrote:

[...]
 So after creating branch, how do I configure it to exclude some files
 from being merged or updated from the mainline version. In other words
 it will be akin to having the working directory made up files from 2
 or more branches in the remote repositories, and pushes and pulls will
 know which files goes where or comes from.
[...]

Possibly you should look at submodules [1] and subtree merging [2].

1. http://progit.org/book/ch6-6.html
2. http://progit.org/book/ch6-7.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Revert To Before A Specific Patch....

2010-03-31 Thread Konstantin Khomoutov
On Apr 1, 2:51 am, Jeffda daniel.viviot...@gmail.com wrote:

 It would be awesome if GIT would have the capability to revert/reset
 to a specific date/time.
Read the manual of the git-reset command (and its --hard command-
line option in particular), read the manual of the git-rev-parse
command and its SPECIFYING REVISIONS section in particular.

-- 
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 duplicate repo

2010-04-11 Thread Konstantin Khomoutov
On Apr 9, 10:00 pm, exa c00lzer...@gmail.com wrote:

 I'm a begginer with git and I'm currently using it with a repo I've
 created so we can work together on our project.
 Now I would like to use Gitorious for my project but keep my original
 repo and have both updated
 And I can't get it working, could someone explain me a way to have two
 repo at the same time.
 Like I can clone either the webrepo or the local and have all the
 files updated by pulling it

Try to rephrase your question as I, for instance, failed to get what
you are really trying to achieve.

At first, Git can fetch changes from any repo you wish any time -- you
simply give it an URL and Git fetches from there. You can also push to
any URL.
Next, Git supports the concept of remotes -- named repositories
which you intend to track (watch the developments occuring in them)
or push your own work to. You can have any number of remotes.

This is what Git allows, and you should think out your workflow based
on these premises.

As to your question, again, it seems to me that you're confusing
remote repositories (gitorious) with local repositories. This is
normal from people coming from centralized VCSs like Subversion. So
possibly read some book/tutorial on Git first to get the idea about
how local and remote repositories relate, why the distinction between
them is just a matter of an agreed upon policy, and might be you will
be able to answer your question yourself.

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

2010-05-06 Thread Konstantin Khomoutov
On May 6, 9:43 pm, jess draco...@gmail.com wrote:

     I had set up a private Git Repo server for my companies projects.
 For testing I did everything as root. Now that I am ready to allow
 others to access the Git Repositories on there I have copied the bin
 files from /root/bin to /usr/bin and created a new repository for the
 main line of code that I am working on /var/git/project. I pointed my
 local repo to that as the new origin.

     When I do a push to the repository I get the following after the
 compression routine:
         Failed to run command 'index-pack': Permission denied
         error: pack-objects died with strange error
         error: failed to push some refs to 'gitu...@git.contoso.local:/
 var/git/project.git'

     When I shifted the bin files from /root/bin I did not see a file
 called git-index-pack. Other git commands seem to be working as normal
 both as root and as gituser.

At first, why don't you just install a Git package provided by your OS
vendor (or made by a third-party)? Even if you're forced to use some
crappy OS for which there's no well-packaged Git, why not just rely on
`make install` to properly install Git built from the sources (assumed
you built it from the sources)? Also, if you are root on that machine
you will supposedly be able to install and use the checkinstall
binary which allows to create ad-hoc packages based on what actions
`make install` invocation took -- this greatly simplifies removing of
installed software later, even if it still stinks on a big picture.

Back to your specific problem -- make sure Git's binary files have
owner/group set to root/root and permissions set to 755, that is, rwxr-
xr-x. But anyway I think you'd better rethink your approach to get Git
working.

-- 
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: help - pushes not reflected on remote origin

2010-05-07 Thread Konstantin Khomoutov
On May 7, 8:34 am, Matt Palermo mpale...@vt.edu wrote:

 I have a server where I setup a git repo.  I cloned it on my local dev
 machine.  I add and delete some files and commit them on my local
 repo.  Then I push the commit to the server origin repo.  All the
 files I deleted in the local repo still appear in the server repo
 structure, and all the files I added in my local repo do not appear on
 the server structure.  I open up gitk on the server repo and it shows
 that my local commit was pushed to the server.  It lists all the files
 that I added/deleted, but nothing is reflected in the server folder
 structure.  It looks untouched.

 Am I doing something wrong here?  How can I get my local commit pushes
 to change the server repo structure?

Most probably your workflow is broken:

https://git.wiki.kernel.org/index.php/GitFaq#Why_won.27t_I_see_changes_in_the_remote_repo_after_.22git_push.22.3F

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: 'v' prefix on version tags

2010-05-07 Thread Konstantin Khomoutov
On May 7, 12:51 am, Trans transf...@gmail.com 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?

I beleive this is just a question of aesthetic preferences.
The only things tag tames might clash with are other commit-ish
names such as names of branches or objects (those hashes composed of
hex numbers), so both 1.0.0 and v1.0.0 have the same chances to
clash with other names.

-- 
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: help - pushes not reflected on remote origin

2010-05-07 Thread Konstantin Khomoutov
On May 7, 7:31 pm, Matt Palermo mpale...@vt.edu wrote:

 Okay, maybe someone can give me advice for the best way to accomplish
 this...  I have a team of developers (myself included) for a PHP website.  I
 also have a design team.  On the main webserver I want to setup the live
 site where all tested code will go.  Then for each developer on the team, I
 want to have another site on the server where that developer can work and we
 can all see his development in progress.  The design team will also have
 their own site on the server.  So it would be something like this:

 - Serverhttp://site.com/live           (live site with only tested/approved 
 code)http://site.com/dev1           (test site for developer 1, which is a 
 clone
 of the live site)http://site.com/dev2           (test site for developer 2, 
 which is a clone
 of the live site)http://site.com/design               (test site for design 
 team, which is a clone
 of the live site)

 So the way I've tried to implement it is this...  Setup a main bare repo.
 Then have clones of the main repo for live, dev1, dev2, design all
 in their respective webroot folders.  Then let's say dev1 makes a change
 that is tested and ready to go live...  I will go to the server into the
 dev1 repo and push it to the main repo.  Then I will go to the live repo
 and pull the changes to it.

 All devs will be able to clone their server dev repo to their local
 machine and work from there.  However, I want their server dev repo to be
 as current as possible so that I can go to the server site for them and see
 the latest changes.  So if developer 1 makes changes on his local clone,
 then he will commit the changes and push them to the server dev repo so
 that the entire team can view the changes on the server site.  The problem
 I'm running into is that when the dev pushes commits to the server, the
 server dev repo working files/folders don't reflect the changes that were
 pushed to it.  Therefore I can visit the dev1 site after a commit was
 pushed to it and it will look/work the same as before the push.  I need to
 always keep the dev sites current with the latest changes.

While Rick's suggestion sounds more sensible, your proposed workflow
involving pushing to non-bare (devN) repos can actually be done using
hooks -- you just missed the last bits of that FAQ entry. A working
sample of such hook can be found in [1] for instance (also don't miss
the article it refers to).

1. http://groups.google.com/group/git-users/msg/c136097332748b1c?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.



[git-users] Re: Question about git pull --rebase

2010-05-13 Thread Konstantin Khomoutov
On May 13, 8:14 pm, Rick DeNatale rick.denat...@gmail.com wrote:

 I've accepted the warning that you shouldn't rebase a branch unless it
 has never been pushed to a shared repository since it can wreak havoc
 on others who have pulled the branch.

 Yehuda Katz just wrote about his git 
 workflowhttp://yehudakatz.com/2010/05/13/common-git-workflows

 He advocates using git pull --rebase, rather than letting git pull use
 the default of merging instead of rebasing.

 Is this good advice?

I agree with Peter Shenkin.

And I interpret the warning in the git-pull manual -- This is a
potentially _dangerous_ mode of operation. It rewrites history, which
does not bode well when you published that history already. -- as a
precaution for the case when the changes you're rebasing during the
pull are also contained in some other (local) branch which is already
pushed or will be pushed later.
To clarify: suppose we have this setting:
1) You have identical commits on both master and origin/master;
2) Then you fork a branch foo off master and add 10 commits on top
of it;
3) Then you merge foo back to master (which would result in fast-
forward);
5) Then you do `git pull --rebase` on master.
This operation will remove these 10 commits off your master branch,
promote it to the state of origin/master and then reapply these
removed commits.
Now you push your updated master and then push that foo branch as
well.
The problem is that these 10 commits which are supposed to be shared
between master and foo are now different.

So, I think if this implication is understood, `git pull --rebase` is
OK.

-- 
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: Get tag date as the the last commit date as of tag

2010-05-26 Thread Konstantin Khomoutov
 Okay this one is (perhaps) a little more challenging. The tag date is
 the date the tag was created. But to me the tag date needs to be the
 date of the last commit made upto that tag. Right now I extract the
 date via:

   $ tag show 1.0.0

 Which gives me a header:

   tag 1.0.0
   Tagger: 7rans transf...@gmail.com
   Date:   Wed May 26 09:48:42 2010 -0400

 Anyone have a good way to do likewise, but get the date of the last
 commit as of the tag, instead of the date the tag was created?

I suspect it's as simple as using
$ git show 1.0.0^
that is, referencing the first (and only) parent of the tag object.
Refer to the SPECIFYING REVISIONS section of git rev-parse manual
page.

Possibly as soon as you understand that all Git commits and annotaned
tags link to each other using object names (hashes), this idea becomes
apparent.

-- 
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: Cron and git archive

2010-06-01 Thread Konstantin Khomoutov
On Jun 1, 8:45 pm, Alexander Zaycev mailof...@gmail.com wrote:

 There is a script to create a backup, with the standard line:

 git archive --format=tar --prefix=project/ HEAD | gzip 
 my_git.tar.gz

 When run manually it works fine, but cron creates a bad archive (size
 20 byte).
 In what may be the problem?

The problem may be anywhere including the current phase of the moon
since you specified almost no details about your setup.

Using my rusty telepathic skills, I suspect wrong current directory or
wrong user at the time of the call.

-- 
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: Connecting Clones

2010-06-01 Thread Konstantin Khomoutov
On Jun 1, 9:06 am, ben bklo...@gmail.com wrote:

 I've created a clone (lets call it Dev) of local project (Core), and
 want to create a remote repo of Dev on a server (Staging) with a
 working tree (the actual files).

 How do I setup the remotes so that I can push from Dev to Staging?

 Is this the wrong way to do it? Should I also have a bare repo on the
 server as origin for everything, then just checkout a staging branch
 when in Staging?

 The catch here is that I've created Core locally, so I can start a new
 project and have all the benefits of Core, and get updates by pulling
 when Core itself is updated.

Looks like you should read this thread:
http://groups.google.com/group/git-users/browse_thread/thread/d8d73c1d8b72527b?hl=en

And this subject has been raised more than once here, so may be a
little searching through the history could yield more solutions.

-- 
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: Pissed at Git!

2010-06-01 Thread Konstantin Khomoutov
On Jun 2, 1:45 am, Dan Preston danpres...@gmail.com wrote:

[...]
 Yeah, agreed.  It's not always immediately obvious.  It'll say Not
 currently on any branch. in the git commit message boilerplate as
 well as git status output though, so I try to keep my eyes peeled for
 that not being the branch I think I'm on.  I like to turn on auto
 coloring in git config and then it colors that red so I notice it.  I
 don't remember the config variable offhand but you should be able to
 look it up on the git config man page.
[...]

I use color.ui = auto

Looks like that's what you're talking about. This setting basically
tries to colorise everything which goes to TTY.

-- 
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: Does git branch always branch of the latest commit?

2010-06-07 Thread Konstantin Khomoutov
On Jun 7, 12:28 pm, vfclists vfcli...@gmail.com wrote:
 Does git branch always branch of the latest commit?
`git branch` branches from the commit you specified. Forget about
Subversion.
If you pass `git branch` the name of a commit object that commit
object is used, if you pass a branch name the tip commit of that
branch is used, if you pass a tag name the commit that tag points to
is used.

 Are files which are not yet committed part of the branch?
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-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: Is it possible to push to 2 or more remote repositories at the same time?

2010-06-07 Thread Konstantin Khomoutov
On Jun 7, 12:31 pm, vfclists vfcli...@gmail.com wrote:

 Is it possible to push to 2 or more remote repositories at the same
 time?
I think it's impossible.
Of course, no one prevents you from writing a simple wrapper script or
a shell alias which will do what you want.

-- 
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: Do git tags get pushed as well?

2010-06-07 Thread Konstantin Khomoutov
On Jun 7, 1:11 pm, vfclists vfcli...@gmail.com wrote:

 It seems tags are not pushed automatically.

 I thought it would be the natural thing to do.
No more natural than automatically pushing every branch you ever
create locally.
Git is distributed which means it does not require any remote part
at all.
Anything you create in your repo is yours and will not be published
anywhere until you excplcitly take actions to do so. Having local (and
throw-away) tags is not more uncommon than having local (and throw-
away) branches which you won't ever push anywhere.
Quite possibly you're deceived by using the `git push` command with no
arguments which seemingly does magic and decides what to push for
you; this is, well, deceiving in some way. Possibly you should re-read
git-push manual and look for examples there.

If you're looking for a way to reliably back up your whole
repository, or a way to maintan exact repositories on several machines
via a single server, consider using `git push --mirror`.

-- 
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: re-init remote without access to the server

2010-06-09 Thread Konstantin Khomoutov
On Jun 9, 12:34 am, Dan Z danielza...@gmail.com wrote:
 I've got some apps on Heroku, and I need to re-init or clean out the
 repositories they use, but Heroku doesn't support direct access to the
 machine. Is there a git command I can use to re-init or completely
 wipe out all history in the remote repository?
You can delete any object (branches and tags) in the remote repo by
pushing nothing to them.
For example, to delete branches master and slave in the remote
repo do
$ git push origin :master :slave
Alternatively, if the remote repo does not explicit hooks' setup
preventing non-fast-forward updates, you can just forcibly push any
new content of a branch. That is, if you have replaced the history of
the branch master, you can forcibly make remote's master have the
same history by pushing it this way:
$ git push -f origin master

-- 
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 on windows.. as server

2010-06-14 Thread Konstantin Khomoutov
On Jun 14, 5:54 pm, Caio cmna...@gmail.com wrote:
 I install git on my machine... and it works fine
 (i read some tutorials and search in this group 
 ..http://groups.google.com/group/git-users/browse_frm/thread/6cf5a3573c...
 )

 but I can't find a tutorial to share my project with another
 programmer (using Windows too)... I just need this 2 machines
 connected
 someone have some tutorial, or can explain to me how to do this?

See http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP

You should not be afraid about that central server thing as the Git
does not really have the concept of a server; the only common
difference between server and normal repositories is that server
repositories are usually bare.

Having said that, I should note I see no real reason not to push
another box running more Git-and-SSH-happy OS which would host your
shared repository, or using one of Git hostings. From the tutorial
above you'll notice that serving Git on Windows is pain in the neck,
and even using it in client mode on Windows is still pain in the
neck (while things are steadily becoming better), so why not use a
solution which just works?
See http://progit.org/book/ch5-0.html for more info on working with
shared repo.

-- 
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 on windows.. as server

2010-06-19 Thread Konstantin Khomoutov
On Jun 14, 5:54 pm, Caio cmna...@gmail.com wrote:
 I install git on my machine... and it works fine
 (i read some tutorials and search in this group 
 ..http://groups.google.com/group/git-users/browse_frm/thread/6cf5a3573c...
 )

 but I can't find a tutorial to share my project with another
 programmer (using Windows too)... I just need this 2 machines
 connected
 someone have some tutorial, or can explain to me how to do this?

By the way, [1] shows that you actually can use Windows UNC paths to
fetch and push changes (provided you're using //server/share instead
of \\server\share with the current state of msysgit). So possibly
another (and simpler) way to go (iff both your machines are on a
single LAN or connected over secure VPN for instance) would be to just
share the necessary working directories and ensure pass-through
authentication works on them for the users who require access to these
shares.

1. http://code.google.com/p/msysgit/issues/detail?id=411#c1

-- 
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: Can I tell git to ignore changes in certain files on merge?

2010-06-20 Thread Konstantin Khomoutov
On Jun 20, 7:50 am, David Bruce davidstuartbr...@gmail.com wrote:

 My program uses gettext, so the *.po files get modified whenever a
 make dist is run.  Usually this just updates the POT-Creation-Date
 timestamp line.  As a result, whenever I try to merge two branches,
 all the *.po files inevitably conflict.  I then have to go through all
 40 or so of these files and delete one of the timestamp lines and the
 conflict markers.

 Is there some way to tell git merge that if a file meeting the pattern
 po/*.po has been modified in both branches, to simply keep one or
 the other, rather than generating files with conflict markers?

I'm not sure about ignoring, but you could do this:
1) Merge with --no-commit;
2) After merging run
$ for f in *.po; do git checkout --ours -- $f; done
3) git commit

This will of course suck if a .po file being merged really contain
some important change.
But anyway if you would ignore such file it would end up unmerged
which would effectively make any changes introduced to that file by
the merged commit disappear.

It might turn out that --no-commit is not really needed since if
merging fails due to conflicts, the commit is not done anyway.

-- 
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: Can't push old tag

2010-07-01 Thread Konstantin Khomoutov
On Jul 1, 8:00 pm, Trans transf...@gmail.com wrote:

 I tried to push my tags for the first time and an old tag is throwing
 an error:

   $ git push --tags
   To g...@github.com:proutils/vclog.git
    ! [rejected]        1.4.0 - 1.4.0 (non-fast forward)
   error: failed to push some refs to '@github.com:proutils/
 vclog.git'

 But my current tag is 1.7.0. What's going here 1.4.0 is old. How do I
 fix this?

First of all, Git has no such concept as current tag. A tag is
simply a file which contains the name of a certain existing commit.
Tags do not move between commits; they are sticky (to the commits
they point to).

When you do `git push --tags`, git tries to push all local tags from
your local repository to the remote repository; any tags which are
missing on the remote side are created there and any tags which point
to different commits are meant to be replaced.

Now, to be honest, I don't quite get what happens in your case: I
always thought updating of tags cannot be rejected, and the concept of
fast-forward does only apply to merges and pushing of branches. So,
to me, this error message appears to be nonsensical.

But I have one idea for you to explore: github may have certain hooks
set up which prevent replacement of tags. That is, tags may be kind of
read-only. I'm not sure if it at all possible but this would explain
your problem. You can do several things to cope with this:
a) Fetching from remote overwrites local tags unless you tell `git
fetch` not to. Hence you can try to do `git fetch` and then retry your
push.
b) You can try to do `git push --tags --force` and see if this will
forcibly overwrite remote tags.
c) You can try to delete the remote tag using `git push origin :
1.4.0`  followed by `git push --tags`.

What to do depends on what repo you think is correct.

-- 
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 http clone error

2010-07-16 Thread Konstantin Khomoutov
Hey, guys, could you please stick to the widely-accepted and sensible
rules of netiquette and at least stop over-quoting let alone top-
posting (which sucks big time on its own)?!

Quoting 5k of text just to post one smiley and make all the list
subscribers see this is slightly over the top in my opinion.

-- 
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: Stash merge conflicts

2010-07-18 Thread Konstantin Khomoutov
On Jul 18, 8:19 pm, Roddie Grant rod...@myword.co.uk wrote:
 I discovered this afternoon a long-forgotten stash. I pop-ed it and now I
 have lots of merge conflicts.

 I'm finding it difficult to grasp the order of events. If I have:

  Updated upstream
 Code block A
 ===
 Code block B

  Stashed changes

 Does that means that Code block A are the changes made after the stash, and
 Code block B are the changes which were uncommitted at the time the stash
 was made?

You can think of stashing this way: when you stash, Git generates a
patch file which contains the differences your work tree had compared
to the HEAD, and then removes all the changes in the work tree
(essentially, what `git reset --hard HEAD` does).
Then you start hacking and make certain commits, promoting the HEAD
and changing the state of the working tree.
They you eventually apply your stash. Recall that the stashed patch
was generated against the HEAD at the time of the stash, and it's
applied on the working tree which might diverge from that state of the
HEAD (and the HEAD itself might have diverged if you did at least one
commit).
Hence, what you're seeing is this:
  * Updated upstream means these changes are in the working tree,
compared to the state of the HEAD at the time you stashed your
changes.
  * Stashed changes means the changes made in the working tree just
before stashing, compared to the state of the HEAD at the time you
stashed your changes.

So, presumably you should stop thinking in terms of ordering of events
and imagine applying patch files instead.

-- 
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: importing svn directori inside git project

2010-07-19 Thread Konstantin Khomoutov
On Jul 19, 6:06 pm, frankie frankie.gua...@gmail.com wrote:

 Hi. I have some svn projects I want to join in a git big project.
   I guess I need to tell git subtree this is a svn subtree but I just
   don't know how.
  Note that any Git repo can be cloned; local repositories residing on
  your local filesystem are no exception; repos created using git-svn
  are no exception, too.
  So you can do this:
  1) Create a local Git repo using git-svn;
  2) Import it using git-subtree passing it the URL of the local Git
  repo created at step (1) as /path/to/the/repo or file:///path/to/the/repo

 Hi I still can't manage to add a subtree.
 I cloned the repository, I tried two different ways:
[...]
 What am O missing ? it looks like git subtree

Well, let me just demonstrate a session involving `git svn` and `git
subtree` which I recorded minutes ago (Debian Lenny, stock Git 1.6.5,
Subversion 1.5.1): http://pastebin.com/xm8aKje4

-- 
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: Non-Git records

2010-07-19 Thread Konstantin Khomoutov
On Jul 19, 8:29 pm, Roddie Grant gitl...@myword.co.uk wrote:
 My recent brush with a forgotten stash has led me to consider again an issue
 which I've never really got a complete answer to - how much information (if
 any) about a project should be kept outside Git.

 IOW do developers keep a note (on paper, spreadsheet, database?) of how
 branches inter-relate, their purpose and so on.

 An example: For a website I'm currently developing, the customer has asked
 me to make what is really a simple cosmetic change. I've done so on a branch
 called cola_moss. But it could be several days or even weeks before the
 customer approves the change and the cola_moss branch can be merged with
 master. In the meantime, other development work continues on other branches.
 By the time I get back to the cola_moss branch I'll not remember what else
 was happening at the time it was created.

 I've found some very useful stuff on line about workflow, but it's all about
 how to use Git, not how to record the process.

 So do developers generally just use the information obtainable from Git
 itself or do they keep external notes too; and if so, what do they look
 like?

I, presonally, do not (yet) use any specific techniques for this, but
several possibilities of storing some meta-information with Git comes
to mind.

First, is the simple usage of annotated tags -- tags which contain
messages attached to them. For instance, having created your
cola_moss branch and finalized the changes made on it, you could tag
its tip with an annotated tag and write in the annotation why the
branch was created (what feature(s) does it implement/what bug(s) does
it fix) and so on. When the customer returns back to you with the
results of testing the branch, you could just do `git show that-tag`
and get the idea about what to do next.
You could employ the fact Git stores tags in subdirectories if they
contain slashes, so you could sensibly name such tags, like this, for
instance:
$ git tag -a pending/cola_moss
When you have dealt with the branch, you can also remove any tags
pertaining to it.

As a variation, in such a tag you could just record a URL of a ticket
in your project's tracker or of a wiki page describing the situation
etc.

Second, it's possible to graft a new empty tree onto an existing Git
repository, and by empty tree I mean a tree which shares no history
with the rest of the repository which differentiates it from normal
trees which are created by the means of forking existing trees. Such
a tree could be used to store any metadata in any format you like. In
the simplest form this could be just a text file with certain notes.
Creating such a tree looks a bit like voodoo but is in fact nothing
special:
$ git symbolic-ref HEAD refs/heads/meta
$ rm *
$ rm .git/index
$ touch notes.txt
$ git add notes.txt
$ git commit -m Create new `meta' branch
$ git branch
  master
* meta

Then, when you need to update any bit meta info about your repository,
you check out that meta branch, update it, then switch back. In any
aspect, it behaves exactly as any other branch.
[1] contains more background info on such branches.

1. http://madduck.net/blog/2007.07.11:creating-a-git-branch-without-ancestry/

-- 
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: Updating a cloned repository

2010-07-30 Thread Konstantin Khomoutov
On Jul 30, 5:36 pm, DAZ daz4...@gmail.com wrote:

 I have only used git for basic stuff, so I hope this makes sense

 Say I create a very small CSS framework and put it in a git
 repository.

 If I want to use the framework in a new website, then I think the best
 way is to clone the git repository, so there is a copy of the
 framework in the website's directory.

 What happens if I update the CSS framework and want the website to
 have the most recent version - is there a git command that I could run
 that would update all the files in the cloned repository?

 I'm not sure I'd want to do this, but what if I improved the cloned
 version and wanted these changes in the original?

You do `git pull` in the cloned repository. See the git-pull man page.

 Sorry if these are really basic questions!
Yes, the question is basic; reading a book on Git is advised. Or at
least a lengthy tutorial.

-- 
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 push to different branches

2010-07-30 Thread Konstantin Khomoutov
On Jul 28, 10:00 pm, joe ehass...@gmail.com wrote:

 When going through several articles/tutorials about git I see the
 following being done for the initial push to a new branch:

 git push origin branchname:refs/heads/branchname

 Is this necessary for subsequent pushes or does git push do the same
 thing?  I just tested this with a couple of dummy repo's and it seems
 to do the same thing.  I've actually been doing this each time I need
 to add/push something new to branches that aren't touched by
 developers:

 ** add files **
 git add .
 git commit -am added foo
 git push origin branchname:refs/heads/branchname

 ** checkout branch that is worked on and pull new data from branchname
 **
 git checkout devbranch
 git pull . branchname
 git push origin devbranch:refs/heads/devbranch

 So, if anyone could clarify this for me that would be awesome :)

First, the refs/heads/ prefix is superficial for most cases and is
only really needed when you have ambigous names (say, tag names
clashing with branch names). See the SPECIFYING REVISIONS section in
git-rev-parse manual page for the precise description of how such an
unprefixed name is revolved.
In other words, you usually just do `git push origin
devbranch:devbranch`.

Second, in most cases you will also omit the part after : (and the
colon itself) because if you do this, the destination ref name is
assumed to be the same as source. In other words, this usually can be
stripped down to `git push origin devbranch`.
Both refspecs are only needed when you want to update a remote ref
with a local ref which has different name, say, you fetched branch
foo from the remote, forked a local branch bar off it, made
several commits on it and then want to update the remote foo with
the fresh stuff in bar; in this case you do `git push origin
bar:foo`.

About the second question: no, nothing is saved automatically (which
is good).
On the one hand, you should be careful about what you push and so
naming refs explicitly is good, not hard. On the other hand, if you
need mirror mode, just use --mirror or other means. git-push
manual is your friend; read in thoroughly.
Also you can modify the behaviour of push in some ways, see
push.default parameter and parameters starting with branch. in git-
config manual.

-- 
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: Developing Wordpress plugins

2010-08-13 Thread Konstantin Khomoutov
On Aug 11, 5:30 am, Daniel Trezub daniel...@gmail.com wrote:

 I've just started using git last week, and I am still learning a lot. This
 means I am still messing with my trees a lot, too :)

 I am trying to mantain a Wordpress website. So I want to use git to keep my
 wordpress installation up-to-date, as described in this post 
 (http://cad.cx/blog/2010/06/21/svn-is-so-wordpress-2-0-using-git-to-ma...).
 I am using git in a private and offline repo.

 At the same time, I am developing mainly two plugins for this site. They are
 kept in the sub-dirs /plugins/feed and /plugins/site-list.

 What I did until now is:

  cd /wordpress
  git init
  git add .
  git commit -m 'wordpress 2.9.2'

 No problem here, until now.

 My question is regarding the plugins in development: what is the best way to
 track them inside this dir using git? I was thinking about making two dev
 branches, one for the feed plugin and another for the site-list plugin, so I
 can develop them separatedly. The problem is: I have no idea how I can keep
 my main wordpress installation up-to-date with the changes in both plugins,
 once they are tested and commited.

I would create two branches: upstream and master.
upstream would receive wordpress updates (hence the naming) and only
them; master would be based on upstream, would host the plugins
and would receive merges from upstream each time it's updated.

Something like this:

1) Initial setup:
$ git init
$ git checkout -b upstream
... roll the wordpress files in
$ git add .; git commit -m wordpress X.Y.Z
$ git checkout master
$ git merge -m Merge wordpress X.Y.Z upstream

2) Hack on plugins (being on master):
$ git add ...; git commit; ...

3) When a new wordpress release appears:
$ git checkout upstream
... roll the new wordpress files, check if some of them are new and
need
to be added, some of them disappeared and have to be removed using git-
rm etc, so
$ git add ...; git rm ...; git commit -m wordpress X.Y.Z+1
$ git checkout master
$ git merge -m Merge wordpress X.Y.Z+1 upstream

Then go to step (2).

If you do not touch wordpress' files while hacking plugins (and you
shouldn't) merges are guaranteed to be clean.

Such approach is used when maintaining Debian packages in Git using
git-buildpackage: you keep the debianisation stuff on master and
each upstream release of the software being packaged goes to
upstream branch first and is then merged into master.

-- 
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: How to move the master?

2010-08-13 Thread Konstantin Khomoutov
On Aug 13, 10:44 pm, David Bruce davidstuartbr...@gmail.com wrote:

 Along these lines, we are in a somewhat similar situation.  Basically,
 we have had a major feature branch for a GSoC project, and this branch
 has now substantially diverged from master.  However, the divergence
 is almost completely due to equivalent work that was done first in
 master, and then re-done by hand in the feature branch because it
 was too hard to merge (we are git noobs).  So, we want to make master
 point to the new branch, and rename master to something like
 old_master for safekeeping.  So it looks like we should first create a
 branch (or tag) to save the tip of master, and then hard reset master
 to the tip of the feature branch.
If you will rename branches, as Rick proposed, there's no need to tag
the original master's tip. The whole idea of such tagging is just to
have a convenient temporary throw-away name.

-- 
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: Merging workflow

2010-08-13 Thread Konstantin Khomoutov
On Aug 13, 7:37 pm, David Doria daviddo...@gmail.com wrote:

 Ah, so fetch is an operation on the entire repository and merge is an
 operation on a specific branch? So you're say that 'pull'ing each
 branch is not necessary because the 'fetch' in 'pull's fetch+merge is
 redundant. Is that correct?
It's a bit more involved: git-fetch can be used to fetch specific
objects from a remote repository, but in the most common case it's
used without any refspecs on the command line, and in this case Git's
behaviour is governed by a special configuration parameter. This
parameter is named fetch, and it is autocreated for each remote when
you do
$ git remote add ...
or
$ git clone
That parameter is set for you to something like +refs/heads/*:refs/
remotes/origin/* (origin is the name of the remote here) which
means fetch all remote branches and forcibly update the same-named
local branches pertaining to that remote.
This default setup makes git fetch remotename bring everything
applicable from the specified remote.
Of course, you're free to tweak this option to suit your needs but in
the general case it just does the right thing.

 I also don't understand why this is a deficient approach? If each
 branch is for a bug fix, then wouldn't it make sense to want to be
 able to work with a branch that has ALL of the bugs fixed?
 I meant something different. Or course, it's perfectly sensible to
merge back to a common branch any bugfixes pertaining to it, but I
can't get such accumulate and apply all at once approach. It seems
like a quite contrived approach, whch is invented just because it
could be invented, and not from a real need.

-- 
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: Word wrap in Terminal

2010-08-16 Thread Konstantin Khomoutov
On Aug 17, 12:13 am, Roddie Grant gitl...@myword.co.uk wrote:
 This is one of those things that should be obvious, but I'm blowed if I can
 find it.

 When I use git log in Terminal on my Mac there is no word wrap, so I only
 get partial commit messages thus (deliberately exaggerated because of email
 word wrap!):

  commit 1db86a46bd5791bb8e11322edfcb6d286bb6b633
  Author: Roddie rod...@myword.co.uk
  Date:   Mon Aug 16 17:14:21 2010 +0100

      References to $fundingLevel funded replaced with partfunded an

      The green stripe needs to know the bucket's funding level to calcu

      partfunded only applies to multiple buckets - when at least one

 How do I get to see complete paragraphs in commit messages?

I'm not a mac user, but I have some experience with posix systems from
which mac drawn this bit of functionality, so the question: does the
output of git-log go straight to the terminal or is it piped to some
sort of pager program like more or less?
In the former case you should check Terminal's settings (google for
Mac+Terminal+word+wrap), in the latter case you should check the
pager's settings. Less, for instance, has the chop long lines option
(also available interactively, as the -S literal key sequence
toggle); you can set this option permanently by adding -S to the
contents of the LESS environment variable.

-- 
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: Pushing to master from Experimental

2010-08-21 Thread Konstantin Khomoutov
On Aug 21, 5:04 pm, David Doria daviddo...@gmail.com wrote:

[...]
 However, if I
 git clone 'repo'
 git branch Experimental
 git checkout Experimental

 do some work

 git push origin master

 I get
 error: failed to push some refs to 'repo'

 Then if I do

 git pull --rebase
 git push origin master

 I get the same

 error: failed to push some refs to 'repo'

 Is there something that needs to be done different if working not
 directly on the master branch?

Let's quote the git-push manual:

refspec...
The format of a refspec parameter is an optional plus +, followed by
the source ref src, followed by a colon :, followed by the
destination ref dst. It is used to specify with what src object
the dst ref in the remote repository is to be updated.
...
If :dst is omitted, the same ref as src will be updated.

Now, when you do
git push origin master
Git tries to update the remote branch master using the local branch
master.

-- 
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: Pushing to master from Experimental

2010-08-21 Thread Konstantin Khomoutov
On Aug 21, 6:03 pm, David Doria daviddo...@gmail.com wrote:

 Ah yes, always so clear... haha
 So I need to do
 git push origin Experimental:master
Yes.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: getting a list of branches

2010-08-24 Thread Konstantin Khomoutov
On Aug 24, 10:24 pm, 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.
It appears that you could parse the .git/info/refs file.

-- 
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: What to do when you get a conflict (rails) of schema.rb

2010-08-25 Thread Konstantin Khomoutov
On Aug 26, 1:51 am, Pito Salas r...@salas.com wrote:

 This happens from time to time and I am not sure the right solution:

 Working on a rails application, I am merging my branch (where I did
 some migrations) with your branch (where you did some migrations too).
 Inevitably there's a conflict with schema.rb.

 What to do? I can manually fix the merge conflict, but I am still stuck with

 ActiveRecord::Schema.define(:version = 20100818220632) do

 Not clear at all what to do with that.

I don't know anything about this stuff but the words rails and
schema bring back memories about this discussion [1], -- check it
out (especially the last message in it) as it might be relevant.

1. 
http://groups.google.com/group/git-users/browse_thread/thread/6bcec737e3617956

-- 
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: What to do when you get a conflict (rails) of schema.rb

2010-08-26 Thread Konstantin Khomoutov
On Aug 26, 6:20 pm, Pito Salas r...@salas.com wrote:

 Hmm. But it's a git-users question. Thanks anyway.
[...]

My understanding is that the -users suffix is used to differentiate
this list from the Git list for developers (hosted at vger.kernel.org)
which for some reason is named just git and not git-dev which
could have more sense for its content.

-- 
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 reset / revert not working

2010-08-29 Thread Konstantin Khomoutov
On Aug 29, 7:38 pm, Flak37 kamathan...@gmail.com wrote:

 I downloaded a bundle which I cloned from.
 Unfortunately the person who made the bundle had made some unstaged
 changes
 I tried to pull, but it gave me an error about the changes
 So i used git reset --hard and I tried to pull again and got the exact
 same error.. (Git diff also shows the files are edited, presumably by
 the guy who made the bundle)

 The GIT GUI showed 3 files which had 'unstaged' changes (the files
 which caused the aforementioned error in the shell. So I reverted the
 changes from within the GUI and the list of files with changes now
 became empty..

 So I quit the GIT GUI and restarted it again, only to see the same 3
 files back on the list, with the changes somehow 'unreverted'
 I modified the folder preferences in Windows explorer and removed the
 'Read only' option

 Tried reverting again, still the files come back with the same
 changes..

 Also tried in GIT Bash :

 git checkout .  (dot)

 and seperately,

 git reset --hard

 Still doesn't work

 For some reason GIT is not able to revert changes to files
 permanently ..
 What might be the reason?

I don't quite follow what you describe (including `git checkout` with
a dot argument of which I still have no idea after consulting the
manual), but the closest thing I can think of is that after you reset
the working tree and do `git pull` you get merge conflicts.

Feel free to provide more details. Start afresh with cloning, go to a
console window, show us the output of `git-status`, do `git reset --
hard`, show us `git status`, then pull, show what it prints etc.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Clone Shows Old Moved Files

2010-08-31 Thread Konstantin Khomoutov
On Aug 30, 2:16 pm, Gregg Leichtman gslac...@verizon.net wrote:

  From my CVS experience, I would expect the behavior that I have seen. I
 just forgot to do the commit and it didn't click that I missed the
 commit until I was told that it does work as I originally expected it
 should.
[...]
 in fact git-mv (like git-add and git-rm) opperates just on working
 directory and staging area (index) levels. It doesn't touch git
 repository itself. So it

I tend to think Git only automatically records a commit when it's the
most sensible thing to do from the point of view of commit
atomicity. Let me explain.
Take merging for example -- a merge which does not result in fast-
forward and does not fail due to conflicts is an atomic operation
since you hardly ever need to amend the commit resulting from a
successfull merge, and so the commit is done automatically (but you
can override this behaviour using --no-commit and introduce any
changes you want before committing).
Renaming a file, on the other hand, is quite an opposite kind of
operation: you might want to include several renames in your commit,
or you may wish to rename a file and then change it, and commit all
these changes at once. Or you might even want to modify a file, rename
it and then modify it again (using its new name).
Renaming a file is similar to editing a file in this regard: you just
modify a filesystem object.

-- 
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: Why we got so heavily involved in the Subversion project..

2010-09-12 Thread Konstantin Khomoutov
On Sep 12, 9:38 pm, Elaine elnemur...@gmail.com wrote:

 http://blogs.wandisco.com/author/david/

 The problem we saw was that the Gitterons were firing (cheap) shots
 at Subversion. Tweets like “Subversion is so [slow/crappy/restrictive/
 doesn't smell good/looks at me in a funny way] and now I have GIT and
 [everything works in my life/my wife got pregnant/I got a girlfriend
 after 30 years of trying/I won six times running on the blackjack
 table]. You get the picture.

 So we decided to do something about it. We pointed out that shelving
 would enable, if an organization chooses, working in a disconnected
 mode. Oh boy did the Gitterons not like that. How dare we make
 Subversion better?!

Having read the posts you have recently made on google groups, I came
to the conclusion that this is merely an advertisement, or SPAM to be
precise as you systematically tout that particular commertial software
product the author of the quoted post brags about. So I'm gonna mark
your post as SPAM.
Please refrain from such posts in the future.

-- 
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: Misnamed remote branch

2010-09-15 Thread Konstantin Khomoutov
On Sep 15, 5:41 pm, Roddie Grant gitl...@myword.co.uk wrote:

 With a moment's inattention I typed
 git push test databaseTests:refs/remotes/dev/databaseTsts
 instead of
 git push test databaseTests:refs/remotes/dev/databaseTests
 and now in the test repos the listing from git br -a includes
 remotes/dev/databaseTsts

 git br -d remotes/dev/databaseTsts
 results in
 error: branch 'remotes/dev/databaseTsts' not found.

 How do I delete the mis-named branch?

git-branch only operates on local branches and any tinkering with
remotes goes via git-push.
To rename a wrongly-named remote branch delete it and push under a
correct name; deleting is done by pushing an empty refspect (see the
git-push manual).
Hence do this:
$ git push test :databaseTsts databaseTests
this will a) delete a remote object named databaseTsts; b) push a
local object databaseTests to the same named remote object.

Note that you don't really understand why do you need that refs/
remotes/dev/ prefix -- git usually does just the right thing when you
supply short names to git-push.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: change another branch

2010-09-16 Thread Konstantin Khomoutov
On Sep 16, 3:11 pm, Michael P. Soulier msoul...@digitaltorque.ca
wrote:

 I forgot to mention the work branch is based on master. It is one or
 more commits ahead. I only  want to move the master head to the work
 head.
 That's what merge is for. Why would you use reset?

Also I should note that Git is smart about merging and in case master
did not contain any commits beyond the point work was forked off it
Git will perform the so-called fast-forwarding of the master branch
by making its tip point to the tip commit in work -- the same thing
which would result from doing `git reset --hard work`.

-- 
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: Misnamed remote branch

2010-09-16 Thread Konstantin Khomoutov
On Sep 15, 5:41 pm, Roddie Grant gitl...@myword.co.uk wrote:

I noticed several spelling errors in my post.
Namely, empty refspect should be read as empty refspec as
refspec is derived from reference specification, and instead of
you don't really understand there should have been *I* don't really
understand, of course.

Sorry for the confusion.

-- 
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: Pushing only a single file

2010-10-01 Thread Konstantin Khomoutov
On Oct 1, 5:57 pm, David Doria daviddo...@gmail.com wrote:

 I cloned a repository, created an Experimental branch, then worked on
 two files:

 1) edit a.h
 2) edit b.h
 3) git add .
 4) git commit -m worked on a and b

 Now I have decided that a.h is ready to push into the main repository,
 but b.h is not. Is there a way to push only a.h even though the work
 on both files is combined together in a single commit?

No, there's no way to do this, but you should not think in terms of
files when working with Git.
Git works with snapshots of the entire tree (each commit is a snapshot
of the whole work tree).
Hence, if you have a commit which changes both files but you only want
to publish changes made to one of these files, you have to split this
commit (changeset) into two or more commits so that you have a commit
which contains only the changes made to one file (and another one with
changes to the other file). After this, you'll be able to push
specific commit to a respective remote branch.
To do this you can use different approaches.

If the commit representing changes to these files is single and is at
the tip (HEAD) of you branch, just do
$ git reset HEAD^
and then commit the changes one by one, making one (or more) commits.

If the changes span several commits you will have to use `git rebase`.

Now you will have a commit which represents changes to just one file
and you can use its name to update a relevant remote branch.

Note that the whole approach smells bad. I think you should consider
creating one or more branches to develop unstable features and one
stable branch into which you will merge the needed changes and which
you will push.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Corrupted repository ?

2010-10-05 Thread Konstantin Khomoutov
On Oct 5, 9:28 pm, Simon slo...@gmail.com wrote:

 I’m trying to put one of my repositories to another machine. I do
 that :

 git clone --bare test test.git
 scp -r test.git u...@host:~
 mv test test.old
 git clone ssh://u...@host/~/test.git
[...]

I'm not sure why later cloning the new repository fails, but I would
suggest using more sensible approach to putting the repository to
another machine in the first place:

$ ssh u...@host
% mkdir ~/test.git  cd ~/test.git  git init --bare
% logout
$ cd test
$ git remote add foo ssh://u...@host/~/test.git
$ git push --mirror foo

-- 
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: Corrupted repository ?

2010-10-06 Thread Konstantin Khomoutov
On Oct 6, 1:11 pm, Simon Lipp slo...@gmail.com wrote:

  I'm not sure why later cloning the new repository fails, but I would
  suggest using more sensible approach to putting the repository to
  another machine in the first place:
[...]
  $ git push --mirror foo
 Doesn’t change anything : on my local machine, after creating the
 remote repository with your method :

 $ git clone ssh://u...@host/~/test.git
 remote: Generating pack...
 remote: Done counting 10171 objects.
 remote: error: unable to find 719d3089ebb11eba608b13070c4e35be5e3969d6
 remote: fatal: unable to get type of object
 719d3089ebb11eba608b13070c4e35be5e3969d6 error: git-upload-pack:
 git-pack-objects died with error. fatal: git-upload-pack: aborting due
 to possible repository corruption on the remote side. remote: aborting
 due to possible repository corruption on the remote side. fatal:
 protocol error: bad pack header

 Note that git push --mirror indicated “Counting objects: *10170*,
 done” (not 10171).
Very interesting.
What happens if you clone on the same host?
$ cd /tmp/foo
$ git clone /path/to/test
or
$ git clone file:///path/to/test
?

If it fails, try looking at `git fsck`.

-- 
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 pull error

2010-10-07 Thread Konstantin Khomoutov
On Oct 7, 11:05 am, Chandu80 chandu.she...@gmail.com wrote:

 I fetched a remote repository(git fetch) and pulled(git pull) the
 contents from it successfully.
 Now I change a file in the working directory,stage it(git add) and
 commit(git commit) it  and then  push(git push) it back to the remote
 repository,it gives me the following error.
[...]
 remote: error: refusing to update checked out branch: refs/heads/master
 remote: error: By default, updating the current branch in a non-bare 
 repository
 remote: error: is denied, because it will make the index and work tree 
 inconsistent
 remote: error: with what you pushed, and will require 'git reset -- hard' to 
 match
 remote: error: the work tree to HEAD.
[...]
 What exactly does this error convey?Is there any other command that
 needs to be executed before moving ahead with the push?
 Thanks in Advance

That Git error message I quoted means precisely what it states: you
have a non-bare (that is, normal) repository on your remote machine,
and the branch *there* you're trying to update with your changes is
currently checked out to the work tree on the remote side.
To understand what would occur if Git would allow you to do this (I
beleive it did allow this until some version in the past) imagine
you're sitting at the remote machine and hacking on that master
branch: you have checked it out and hence your work tree now contains
the same files as the master's tip. All the changes you're making in
your work tree are relative to that master's tip commit.
Now imagine someone else pushes their own changes to your master
branch (what you described in your post) but your work tree does *not*
change (obviously) and -- worse -- you have no clue someone just
changed the world under your feet by promoting the tip of the branch
your work tree is relative to.
In the simplest case you won't even be able to commit your changes,
in more involved changes (say, if that branch was forcibly updated by
replacing some commis) you may end up with changes in your working
tree which cannot be applied to the new tip.

As to solutions to this problem, there's no single one as what to do
depends on what you need.
For instance, you can go to that remote machine and pull the changes
from the repo you're trying to push from.
Or you can do what Git told you and forcibly push your changes and
then reset the working tree on the remote side.
See also:
http://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked-ou
http://www.kernel.org/pub/software/scm/git/docs/git-push.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Corrupted repository ?

2010-10-07 Thread Konstantin Khomoutov


On Oct 7, 10:43 am, Simon Lipp slo...@gmail.com wrote:
  Very interesting.
  What happens if you clone on the same host?
  $ cd /tmp/foo
  $ git clone /path/to/test
  or
  $ git clone file:///path/to/test
  ?

  If it fails, try looking at `git fsck`.

 On the local side, git clone works and git fsck only indicate some
 dandling blob and commits (that's my bad habit of doing git reset
 --hard HEAD^ ;)). On the remote machine :
 broken link from    tree 869a1d54960d405d661e747c1c056a59cc8d2e9b
               to    blob 719d3089ebb11eba608b13070c4e35be5e3969d6
 missing blob 719d3089ebb11eba608b13070c4e35be5e3969d6

 But it’s an old version of git on the remote machine (1.4.4.4) — I’m not
 the admininstrator and he’s not willing to upgrade.

 I said that there’s no problem with the local machine, but it’s only
 for cloning. The problematic directory also has problems here :
 $ git ls-tree master
 16 commit 719d3089ebb11eba608b13070c4e35be5e3969d6  DesktopChaos

 The interesting part is :
  - 16 for a directory. It’s the only directory with this mode. I
    don’t know what it means though.
  - the directory is a blob for git 1.4.4.4
  - the directory is a commit for git 1.7.3

 The commit that introduced the problematic directory is
 f3ef8b57e8e71b44c9c669d32b16faf82c643fce. git log on the remote side
 gives up with:
 fatal: corrupt tree sha 719d3089ebb11eba608b13070c4e35be5e3969d6

 On the local side, better luck:
 diff --git a/htdocs/themes/DesktopChaos b/htdocs/themes/DesktopChaos
 new file mode 16
 index 000..719d308
 --- /dev/null
 +++ b/htdocs/themes/DesktopChaos
 @@ -0,0 +1 @@
 +Subproject commit 719d3089ebb11eba608b13070c4e35be5e3969d6

 But I don’t remember creating a subproject. In fact, I don’t even know
 what is a subproject under git :)

Heh, this makes (some) sense in fact: googling for git file mode
16 yields, among others, a reference to [1] which contains an
example with that same file mode, and that section is about Git
submodules. Submodules are, well, a way to maintain several
independent repositories tied together.
Now, according to [2] the support for submodules was added in 1.5.3
and your remote git is unaware about this functionality.
Hence, I think there's a good chance that all this happens just
because remote Git chokes on that file mode it simply does not know
and treats as invalid.

The solutions seems to be is to rebase a necessary branch and delete
that f3ef8b57e8e71b44c9c669d32b16faf82c643fce commit. Note that I'm
not completely sure; I'm thinking this way: if you don't know what
submodules are you're most probably not using them and that reference
to a submodule is just some artifact of a earlier development, and
*possibly* it can be removed as it seemingly just records the commit
which Git should consider as current with regard to that submodule.
Check the docs on submodules to be sure.

1. http://progit.org/book/ch6-6.html
2. https://git.wiki.kernel.org/index.php/SubprojectSupport

-- 
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: creating/submitting a patch series

2010-10-08 Thread Konstantin Khomoutov
On Oct 8, 9:30 pm, David A dsah...@gmail.com wrote:

 Can someone suggest a method for how to creating a series of patches
 for submission to a project?

 For example, I want to add feature A and a new command B to use
 feature A. So a patch series might be:

 1. add base code for feature A
 2. modify existing commands to handle existence of feature A
 3. move common code to a 'utility' file
 4. add new command

 How then do I create a patch series and submit them in order with the
 'cover' email showing the summary of the new feature and command?

Use `git format-patch` and/or `git send-email`.

Also note that rebasing is helpful when preparing a patch series for
sending upstream.
First, before extracting the patchset you should fetch the latest
changes from the whatever upstream branch you're preparing your
patches against and rebase your branch on top of it to ensure it
applies OK and works.
Second, you can use rebasing to beautify the history of your
developments, if needed -- reorder commits, clump certain adjacent
commits together, split commits, rewrite commit messages etc. This
might have not much sense when you're developing in a private repo,
but when you prepare a patchset you want it to be as much readable as
possible.

I would recommend glancing through [1] and [2] to see best practices
of creating and posting patchsets.

1. http://news.gmane.org/gmane.comp.version-control.git
2. http://groups.google.com/group/msysgit/topics

-- 
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: diff-ing branches

2010-10-12 Thread Konstantin Khomoutov
On Oct 12, 9:17 pm, David Doria daviddo...@gmail.com wrote:

 Here is my setup:

 MasterRepo: branch 'master' - this is the live copy

 SecondRepo: branch 'mybranch' - cloned from MasterRepo's master branch
 a long time ago. Changes have been made.

 What I want to do is see which files are different in SecondRepo's
 mybranch versus MasterRepo's master branch. Can I do this? All of the
 commands I have found are for diffing two branches in the same
 repository.
So just bring the MasterRepo's master branch to the SecondRepo and
do any comparisons you need. Then delete that branch.

For instance:
$ git remote add roots ssh://URL/of/MasterRepo
$ git fetch roots master
$ git log --oneline master ^remotes/roots/master
...
$ git remote rm roots

-- 
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: Need Help - CONFLICT (add/add)

2010-10-13 Thread Konstantin Khomoutov
On Oct 13, 8:44 pm, Ken kohud...@gmail.com wrote:
 Thank you very much for your help Konstantin!!  I submitted the first
 command:

 git checkout --theirs public/images/NewMexico_jul_1.jpg

 And received the following error:

 error: pathspec 'public/images/NewMexico_jul_1.jpg' did not match any
 file(s) known to git.

 Ideas?
No immediate idea.
Could you do
$ git reset --hard HEAD
(this will bring you to the pre-merging state)
and repeat the merge?

-- 
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: Push Problems

2010-10-22 Thread Konstantin Khomoutov
On Oct 22, 9:23 pm, Ravi D r...@haasiniventures.com wrote:

 I followed the instructions on git book and set up a private git
 repository. The idea is that all the developers in our company should
 be able to push to this git repo. However, it seems that i am getting
 permission errors. Short of making the repository 777 what can i do to
 allow multiple developers to push to the same git repository

I see two ways:
1) Use gitolite or gitosis which make server-side Git behave more like
Subversion (all repositories are operated using the same user account,
and developers are differentiated by their SSH keys, with fine-grained
control over who can do what).
2) Try the usual Unix approach:
   * Add all the necessary devs to a common group.
   * Make the repository writable by that group, and set the set
group id bit on it. Both these changes should be made recursively.
   This assumes Git runs with umask 002, and not with 022 or something
like this. I have no idea about how to check/change that.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Are private blobs/trees possible?

2010-10-25 Thread Konstantin Khomoutov
On Oct 25, 11:24 pm, kj kyn...@gmail.com wrote:
 There are some files that I want to keep under local git control, but
 never
 push to any remote repositories.

 What's the best way to implement this idea with git?

 The best solution I can think of is to put these files in some
 git-controlled directory that is not below the main working
 directory, and
 have an (ignored) symlink to it in this working directory.

 Is there a better way?
I'm not sure but submodules look like another possible candidate: you
have a separate repo for your files which is linked to your main one,
and you ever push only your main repo. See [1].

1. http://book.git-scm.com/5_submodules.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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 Merge Conflict

2010-10-26 Thread Konstantin Khomoutov
On Oct 26, 11:26 am, Chandu80 chandu.she...@gmail.com wrote:

 I have two files rpc-devexprcpseq-nav.rb and readme.txt.
 My workflow is as follows.
[...]
 Auto-merging lib/rpc-devexprcpseq-nav.rb
 CONFLICT (content): Merge conflict in lib/rpc-devexprcpseq-nav.rb
 Auto-merging readme.txt
 CONFLICT (content): Merge conflict in readme.txt
 Automatic merge failed; fix conflicts and then commit the result.

 In order to resolve this merge conflict do I need to remove the
 spacing in the code
The conflict means Git sees the changes were made to the same
portions of the same file in both branches participaring in the merge
process.
So you're thinking in the wrong direction -- you should try hard to
understand what's the essense of the concept of conflicts in VCS is,
and then the idea about resolving them comes naturally.
In your case, you should decide what contents the merged version of
the file should have and then make it have that contents.

 As I am new to git,I want to know what does the following indicate?
  HEAD
 ===
  work

 These have been introduced in both the files after the merge.
This indicates a chunk which contains one of the conflicting changes,
that is,
the file in the checked out branch contains the text between

 HEAD
===

and the file being merged contains the text between

===
 work

at the same place in the file -- that's why there is the conflict in
the first place.
Now you have to decide which version of this chunk should end up in
the resulting
file by deleting one of the pieces and all the conflict markers. Or
you might decide that the text from both pieces should be somehow
naturally merged, say, out of

 HEAD
one
two
four
wrong
===
three
five
 work

you might decide that the resulting chunk has to be

one
two
three
four
five

that is, both pieces intermixed and the wrong line deleted.

As you are new to Git, start from reading books -- Basic Merge
Conflicts in [1], for instance. Also see [2] for instance -- it
discusses how to pick one side of the file being merged over another
without the need to deal with conflict markers, and merging binary
files.

1. http://progit.org/book/ch3-2.html
2. http://groups.google.com/group/git-users/msg/12c06fe985f4ff45

-- 
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 push error

2010-10-27 Thread Konstantin Khomoutov
On Oct 27, 11:22 am, Prashant Shirbhate prashantshirbh...@gmail.com
wrote:
 While pusing my filed to  my your public repository i got below error.

 Please suggest for the same

 C:\private\prashantgit push
 To c:\lmg_test\public_prashant.git
  ! [rejected]        master - master (non-fast-forward)
 error: failed to push some refs to 'c:\lmg_test\public_prashant.git'
 To prevent you from losing history, non-fast-forward updates were
 rejected
 Merge the remote changes before pushing again.  See the 'Note about
 fast-forwards' section of 'git push --help' for details.

Answered in the FAQ: [1].

1. 
https://git.wiki.kernel.org/index.php/GitFaq#Why_is_my_push_rejected_with_a_non-fast_forward_error.3F

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: svn repository URL and git

2010-10-27 Thread Konstantin Khomoutov
On Oct 27, 5:06 pm, hetchkay hetch...@gmail.com wrote:

 We have started using git and git-svn.

 I was thrilled to see that two people cloning using git svn clone
 from the same repository got the same sha1 IDs for the commits which
 meant that each of us could sync with svn independently while still
 being able to share code among ourselves.

 But my excitement was shortlived as the sha1 IDs were different if we
 refer to the svn server using an alias. For example, 
 usinghttp://mysvnserver.mydomain.com/repos/myproject/trunkgave different
 sha1 IDs from usinghttp://mysvnserver/repos/myproject/trunkeven
 though both refer to the same repository. This also disallowed using
 mirrors of the repository for cloning.

 Apparently the sha1 ID is generated from the full path of the URL.
 Instead of this, could git-svn init be made to accept an optional
 prefix argument as well which is filtered out of the URL before
 building the sha1 ID. This will allow easy support for the oft
 requested support for svn switch --relocate. How much of an effort
 is this? I don't know perl or git internals well enough for me to take
 a stab at it but I am willing to learn if someone can give me some
 pointers.

I think this sort of questions should be asked on the main Git mailing
list (git at vger.kernel.org [1]) as this one is for helping end users
user Git, not hack on it.

1. http://dir.gmane.org/gmane.comp.version-control.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.



[git-users] Re: Command not found

2010-11-04 Thread Konstantin Khomoutov
On Nov 5, 12:10 am, Gareth gareth.b.fos...@gmail.com wrote:

 I've installed git using 'apt-get install git' - and ran fine. However
 - it doesnt seem to work. If I do a whereis git it returns nothing.
 And if I do a dpkg -s git I get this:

 Package: git
 Status: install ok installed
 Priority: optional
 Section: utils
 Installed-Size: 60
 Maintainer: Ian Beckwith i...@erislabs.net
 Architecture: all
 Source: gnuit
 Version: 4.9.4-1
 Depends: gnuit
 Description: transitional dummy package which can be safely removed
  This is a transitional dummy package to pull in the renamed
  gnuit package. It can be safely removed.

 That doesnt sound good does it - ? What have I done / Or should I do
 to fix it?

This is a question about Ubuntu, not Git.

For some reason you did not do a couple of obvious things.
First, search the package database.
Typing pakages.ubuntu.com/git in the browser's address bar and
hitting the Enter key brings a list of packages named git from which
it's clear that your installed package is not the right one, and the
one you're looking for acquired the name git only in Maverick.
Next, simply doing
$ aptitude search git
on my Debian system brings a list of some 20 packages, from which it's
easy to discern packages related to Git VCS; on my system it's git-
core and friends.
The same can be done in the search form on http://packages.ubuntu.com/
which is able to search the package database both by package names and
by contents of the packages.
Again, no problems finding Git.

And last, if you installed a package named git and it does not seem
to provide the required binary, do
$ dpkg -L git | grep /bin/
to find all user-reachable executable files installed by that package.

Bottom line: from your situation I assume you're using Karmic, and for
it, the package providing Git VCS can be found using [1], which states
that the package is named git-core.

Note that you also might want to install packages git-gui and gitk to
get its standard GUI front-ends at your disposal.

1. 
http://packages.ubuntu.com/search?searchon=contentskeywords=gitmode=exactfilenamesuite=karmicarch=i386

-- 
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: applying and un-applying the same commit

2010-11-13 Thread Konstantin Khomoutov
On Nov 12, 10:59 pm, ruud r.grosm...@gmail.com wrote:

[...]
 I work on several project on two sites: the site the software wil run
 on eventually and on my laptop.
 The two sites differ: the operating system is different, the installed
 software is a bit different and the file system has another structure.
 When I pull from the git repository, the first thing I have to do is
 to adjust the software and inifiles a bit so that it runs on my
 laptop. When I push to the repository, I have to undo the changes
 before pushing.
 And the next time, I have to do exactly the same.

 I do the adjustments now in a commit on its own, so that I can undo
 that one with rebase, but I am still not comfortable with it. I have a
 feeling there must be a better way,  a git way to apply and un-apply
 the environment changes.
 Can you advice me what commands I can use to tackle this little
 inconvenience?

There's a way to make automatic modification to the contents of the
files when they are checked in and out, see [1], in particular, the
filter attribute.

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

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Looking up SHA1s

2010-11-16 Thread Konstantin Khomoutov
Martin Fick wrote:

 This might be a silly question, but I can't figure it out: is
 there a way to get all the tags and branches whose tip
 includes a certain blob (by SHA1) in its tree object?

I doubt there is any ready-made solution for this corner case, but you
could roll your own using git-ls-tree low-level command -- given a
commit name, it outputs a list of objects the tree linked to that
commit references, and that output includes type, sha1 and name of
each of those objects. So you could write a script which starts with a
given commit name, calls git-ls-tree on it, tries to find a matching
sha1 in its output, and that fails, descends to each listed tree
objects doing the same thing on them until either the hierarchy is
exhausted or the matching sha1 is found.

-- 
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: Looking up SHA1s

2010-11-16 Thread Konstantin Khomoutov
On Nov 17, 4:12 am, Martin Fick mf...@codeaurora.org wrote:

   This might be a silly question, but I can't figure it
   out: is there a way to get all the tags and branches
   whose tip includes a certain blob (by SHA1) in its tree
   object?
  I doubt there is any ready-made solution for this corner
   case, but you could roll your own using git-ls-tree
[...]
 Thanks, I actually just did something similar.  Although
 the -r option to git-ls-tree seems to recurse for me
 automatically.  A few simple switches to automatically
 iterate over the list of branches and tags and... a simple
 working generic solution.  I am still kinda curious if there
 isn't a much better way since this may not scale well on
 large repos?  It takes about ~1s on a cached gerrit repo.

I think it would be then fine to ask this question on the main Git
list (git at vger.kernel.org). Maybe you'll get additional hints on
the implementation.

-- 
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: How do you download only the necessary part of a repository?

2010-11-16 Thread Konstantin Khomoutov
On Nov 16, 2:20 am, vfclists vfcli...@gmail.com wrote:

 If you want to work with only a few of the branches of a remote
 repository, how to you clone it in a way which does not bring down
 everything?
I think it's impossible.
But you should maybe rethink your approach to this.
First, what you requested could only spare you bandwidth and disk
space if the branches contain really divergent histories; for a
typical project it is not true -- the branches tend to share vast
amounts of history (hence bringing only few of them in would anyway
bring most of the history), and if they don't, then you should
probably look at submodules [1].
The next thing to consider is shallow cloning -- see this FAQ entry
[2].

1. http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html
2.
https://git.wiki.kernel.org/index.php/GitFaq#How_do_I_use_git_for_large_projects.2C_where_the_repository_is_large.2C_say_approaching_1_TB.2C_but_a_checkout_is_only_a_few_hundred_MB.3F_Will_every_developer_need_1_TB_of_local_disk_space.3F

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Output from push

2010-11-23 Thread Konstantin Khomoutov
On Nov 23, 10:33 pm, Roddie Grant gitl...@myword.co.uk wrote:
 Could someone kindly explain the following or point me to an explanation. It
 is typical of the output from a push. I committed and pushed one file, so
 why 9 objects counted, and 5 compressed and delta 3?

 Counting objects: 9, done.
 Compressing objects: 100% (5/5), done.
 Writing objects: 100% (5/5), 638 bytes, done.
 Total 5 (delta 3), reused 0 (delta 0)
 To ssh://path/to/repo
    c1c4655..02cbed4  general - dev/general

 When I went to remote repo and merged, it confirmed:
 1 files changed, 19 insertions(+), 8 deletions(-)

I never bothered to learn what these numbers precisely mean (because
this is utterly low-level info), but the general idea is that the
object has a broad sense, and it includes anything which Git stores
in its database (and which SHA-1 hash it knows).

Thus, even if you do one commit changing one file, the database will
store at least three new objects:
1) The commit object, recording your commit message, other commit
metadata and pointing to the parent commit object(s), and the tree
object this commit refers to.
2) The file blob representing the contents of the changed file.
3) The tree object mentioned at step (1); it represents the state of
the tree associated with a commit by referencing participating files
and directories using their SHA-1 hashes. The new tree object for our
imaginary commit is required because the new contents of the changed
file hashes to a different SHA-1 hash.

Pushing a branch to a remote repository pushes the commit object
located at the tip of that branch, and pushing it recursively pushes
all the objects referenced by that commit object and which the remote
side does not yet have.

To make things simpler to grok, you can think of all those three types
of objects as being plain text files.
Playing with `git ls-tree` and `git cat-file` can give a very clear
idea about how objects reference one another.

-- 
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: Forcing a non-fastforward push

2010-12-06 Thread Konstantin Khomoutov
On Dec 5, 11:43 pm, Roddie Grant gitl...@myword.co.uk wrote:

[...]

Oops, the sequence
$ git checkout nowork
$ git reset --hard dev/mybranch
will make the nowork branch be the same as dev/mybranch branch, of
course.

-- 
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: Output from push

2010-12-10 Thread Konstantin Khomoutov
On Nov 24, 2:20 pm, Roddie Grant gitl...@myword.co.uk wrote:

[...]
 To make things simpler to grok, you can think of all those three types
 of objects as being plain text files.
 Playing with `git ls-tree` and `git cat-file` can give a very clear
 idea about how objects reference one another.
 Thanks Konstantin, that's very helpful. I'm still trying to conceptualise
 how Git works, and your reply has filled in a few gaps.
I recently came across this paper [1] which you may find useful as it
tries to explain Git on the object level, showing the precise steps
Git performs to create a new commit.

I've spotted one minor deficiency in the article so far (there's no
such thing as the HEAD of the current branch as Git maintains just
one HEAD ref), but otherwise it looks pretty good and is easy to read
and understand.

1. http://www.newartisans.com/2008/04/git-from-the-bottom-up.html

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Output from push

2010-12-10 Thread Konstantin Khomoutov
Rick DeNatale wrote:

[...]
 I've spotted one minor deficiency in the article so far (there's no
 such thing as the HEAD of the current branch as Git maintains just
 one HEAD ref)
 Not exactly.

 .git/HEAD contains an indirect reference to a git ref so, if I'm
 working on the branch foo

 $cat .git/HEAD
 ref: refs/heads/master

 $ls .git/refs/heads
 foo master

 so there's a heads ref for each branch known to my 'client' machine

 $cat .git/refs/master
 0407dee585688b08aecdd27ff33bcea81d8422a5

 $cat .git/refs/foo
 249599f642b50ffc2dd0fcd1f4716b8fc89e5633


 These are the sha hashes of the last commit on each of the branches.
[...]

This is all true, of course, but I meant point out a different issue.
Actually, I was talking about this phrase:
... If I pass the -f option to checkout, it acts the same in this
case to reset --hard, except that checkout only ever changes the
working tree, whereas reset --hard changes the current branch's HEAD
to reference the specified version of the tree.,
and that's why I used the word HEAD, and not head.

The idea is that the HEAD is a distinguished reference, which is
used to point to the commit object on which the work tree is based,
and it has no inherent relation to the notion of the current branch.
I suspect the author really meant an informal head there, or the
branch's tip commit, but in its present form that phrase can make a
beginner into thinking each branch has some sort of reference named
HEAD attached to it, which is wrong.

I also suspect the author came from Subversion (as I did) where the
phrase current branch's HEAD has perfect sense. ;-)

-- 
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: Merge log about same user.

2010-12-10 Thread Konstantin Khomoutov
Marcello Henrique wrote:

 I have a git repository, I commited by diferent accounts just that
 same people. How merge historic into logs?

I can't quite parse this.

Do you mean you have a line (or lines) of commits made by different
committers which are, in fact, the same person, and now you want to
rewrite the commit messages so that all the commits have the same
author?

Or do you mean you have several branches made by different people and
you want to somehow combine them into a single branch?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: pulling from a git svn repo locally

2010-12-10 Thread Konstantin Khomoutov
steve.maring wrote:

[...]
 $ git svn clone -s http://192.168.1.10/svn/project project

 that will checkout http://192.168.1.10/svn/project/trunk to project

 now, I go over to my shared folder space and make a git repo ...
[...]
 and then, the interesting thing to note is that over in /home/smaring/
 project, doing a 'git branch' suggests that there is no branch

 any thoughts?
Does `git branch -a` show anything?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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: Merge log about same user.

2010-12-10 Thread Konstantin Khomoutov
Marcello Henrique wrote:
 The first option, commits made by different committers which are, in
 fact, the same person.
Then you should probably use a properly instrumented call to
`git filter-branch --commit-filter`
According to the git-filter-branch manual [1], it exports a set of
environment variables GIT_AUTHOR_* and GIT_COMMIT_* whose values can
be changed in the filter code to affect the recorded commit.

I think that should be something like:

$ git filter-branch --commit-filter '
  if [ $GIT_AUTHOR_NAME = Marcello Henrique ]; then
GIT_AUTHOR_NAME=John Random Hacker;
GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME;
GIT_AUTHOR_EMAIL=bi...@microsoft.com;
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
  fi' HEAD

May be the filter code should also `export` the changed variables -- I
don't really know.

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

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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-svn setup advice for newbie

2011-01-02 Thread Konstantin Khomoutov
On Sun, Jan 02, 2011 at 08:04:14AM -0800, navtis wrote:

 I'm new to git, and am looking for advice on the best way to create a
 moderately complicated setup with the following constraints:
 
 * The main public repository for this software is subversion, and is
 not under my control
 * I need to fetch updates from the subversion repository to my
 development host (running gentoo) regularly, but cannot write to it
 (my updates are pushed back through manually created patches)
 * I need to create two branches for my local code, both of which need
 to be regularly merged with the updates from subversion
 * I need to be able to export both branches local code to a staging
 server, which is running centos (the OS is relevant as I expect to
 have to make minor tweaks to the code to get it running with different
 library versions etc)
 * The production server is running RHE, and no development work should
 take place on it. It will only run one of the two branches.
 * I am working on my own at the moment but there are likely to be
 other developers involved soon

I'm not quite sure what exactly you want advice on.
If you only need to periodically fetch from a Subversion repo using
git-svn, that's fine -- you will get a branch which is not really
different from a branch that would result from fetching from a Git repo.
The rest is just usual Git operations which will not be aware of
the fact Subversion is present in this picture.

The only problem I can envision off the top of my head is the need to
maintain the authors file to do fetches from Subversion and get
sensible author names and e-mail addresses in the generated Git commits.
See [1] for the hints on how to do this.

Hence, the course of action for you would probably be:
1) Prepare the authors file.
2) git-svn clone the Subversion repo.
3) Fork its master branch to your two local branches.
4) Add another two remotes (the first one will be svn, created by git-svn)
   which you will use to do pushes to your staging and production
   servers.
5) When needed, `git svn fetch` the changes from the Subversion repo
   then switch to each of your local branches in turn and do `git rebase
   master` in them.
6) How to push to the staging and production servers is really beyond
   this question as it depends on your requirements and taste.

Having multiple developers working with you *might* require that you
have only one box which does fetching from the Subversion repo and then
pushes the resulting changes in the tracking branch to some server, and
everyone else fetches from there. This might be necessary as fetching
from Subversion *creates* Git commit objects, and this process depends
on local settings (including the authors file, if used) -- having
different local settings might result in creation of commits which hash
to different SHA-1 hashes for the same Subversion revisions, and this
obviously breaks the idea central to Git of identical objects having
identical hashes.

1. http://wiki.debian.org/Alioth/Git#ConvertaSVNAliothrepositorytoGit

-- 
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-svn setup advice for newbie

2011-01-02 Thread Konstantin Khomoutov
On Sun, Jan 02, 2011 at 11:39:36PM +, graham wrote:

[...]
 Hence, the course of action for you would probably be:
 1) Prepare the authors file.
 2) git-svn clone the Subversion repo.
 3) Fork its master branch to your two local branches.
 Is there a best way to do the fork? For longstanding branches I guess a
 cp -r would be better than a git branch?
I don't think so -- Git's switching of branches is light-fast and you only
should consider something like `cp -r` (but *not* exactly this, see below)
only if you for some reason really want to have these two branches
available in parallel as two checkouts (two directories on your hard
drive available both at the same time).
Note that it's possible to switch to another branch while in the middle
of hacking thanks to the `git stash` command -- you `git stash` the
changes in your work tree (and hence make it clean), switch to another
branch, do something on it, switch back, and `git stash pop` the changes
you stashed at the first step.

I think if you really want to have any two branches to be checked out in
parallel, it suggests you'd better have two different repositories for
them.

Also there's no need to use `cp -r` in any case -- if you clone a
repository locally, Git tries to hardlink everything it clones. There
are even methods to explicitly share certain objects.

 4) Add another two remotes (the first one will be svn, created by git-svn)
which you will use to do pushes to your staging and production
servers.
 I don't follow this step - why does one of the remotes need to be svn,
 not pure git?
Bad phrasing on my part: the first is meant to designate the remote
that `git svn init/clone` will create for you -- it is named svn by
default. Then you add two other remotes for your Git servers.

[...]

-- 
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] Failing command: git config --global user.name RichardOnRails

2011-01-08 Thread Konstantin Khomoutov
On Sat, Jan 08, 2011 at 03:28:19PM -0800, RichardOnRails wrote:
 When I issue the following command in a Command window:
 K:\git config --global user.name RichardOnRails
 I get the following response:
 The system cannot find the path specified.
Oh, and I forgot to add that this is most probably a MsysGit-specific
problem so this should better be moved to its list, which is
msysgit at googlegroups.com

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-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.



  1   2   3   4   5   6   7   8   9   10   >