Re: [git-users] Re: how is name-rev determined

2023-03-06 Thread Uwe Brauer
>>> "PO" == Philip Oakley  writes:

Hi Philip,

> Hi Uwe,
> (supplemental to Felipe's reply)


I hope this message goes to the mailing list, I answered Felipe's mail
and again the message to the mailing list was rejected. That happened to
Tassilo some time ago. Sigh.


> Underlying the 'branch name' "problem" is the same conceptual shift that 
> Git adopts for the separation of file names from the (blob) content.

> For 'branches', their names likewise become temporary meta-data artefacts 
> that the computer (and hence the software logic that has to deal with it) 
> does not care about. At best we (Git) allow the distinction between 'first 
> parent' and other parents at a merge, but aren't concerned with where a 
> branch started, especially if someone else started it, and hasn't merged it 
> yet into a line of development we've looked at. (i.e. distributed 
> development could bring with it some real collaboration and communication 
> issues that we just side stepped - see Conway's Law vlog 
> https://www.youtube.com/watch?v=5IUj1EZwpJY for thoughts on that)

Hm that might be entirely personal, but if I see a complex graph with
some branches I want to know which commit belongs to which branch and I
want to know where the branch started. Recently I had to deal with a
problem in a collaboration and it was helpful to know where the branch
started, because some stuff ended up in the wrong branch. Anyhow, it is
personal I would say.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/87ilfeos27.fsf%40mat.ucm.es.


smime.p7s
Description: S/MIME cryptographic signature


Re: [git-users] Re: How to resolve merge conflicts on octopus merges

2022-05-16 Thread Erika Bailey
Unsubscribe 

Sent from my iPhone

> On May 16, 2022, at 7:20 AM, Philip Oakley  wrote:
> 
> 
> One of the big unstated aspects is the distinction between --automatic and 
> --interactive expectations. The main Git project has the assumption of 
> --automatic merges without any need for user intervention. That's on the 
> assumption of a 'clean' workflow with proper separation of concerns, small 
> changes, short lived branches and all that good stuff. There is also the 
> expectation that the code change and commits will be readable and 
> understandable in hindsight / maintenance. This all drives the 'No conflicts' 
> rule.
> 
> But as we all know the more general reality is the "Big Ball of Mud" 
> development process (or at least that's where our problems are ;-). In these 
> cases it will be an --interactive muddy merge, usually with multiple 
> participants. Either because they each contributed a branch to your octopus, 
> or they each had an area and files of interest when the mega-feature (single 
> branch) is being merged, and no single person can resolve the combined 
> conflict (there have been discussions on that). 
> 
> I suspect that what is needed is a half way house that acknowledges both 
> positions and offers a Partial Merge (or muddy merge (tm)). This needs a 
> method of capturing the 'per person / branch' staged changes, and the final 
> 'global' octopus, so that the simplified history is one of the single mega 
> merge, all done in one magic step, but beneath that is the details of the 
> partial merges. 
> 
>> On Monday, May 16, 2022 at 5:45:20 AM UTC+1 johannes.lipp...@gmail.com wrote:
>> Very interesting, thank you. Especially that this discussion has been so 
>> recent indeed.
>> 
>> So after reading through that thread I had a look at git-merge-octopus.sh 
>> itself.
>> I understand that it is a design decision to not to make octopus merges with 
>> manual conflict resolution easy.
>> I still think that that is a petty and that it would be useful.
>> On the other hand, implementing it would mean reimplementing 
>> git-merge-octopus almost completely.
>> 
>> So I guess I will just hack together a custom solution for me.
>> If I should stumble about a solution that can be generalized somewhat easily 
>> then I will report back.
>> 
>> Thanks a lot,
>> Johannes
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to git-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/git-users/d0afebca-8078-4df4-b4eb-59aa66ad65aan%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/1122A4B9-FE52-43EF-8AA3-3E6C78D29164%40gmail.com.


Re: [git-users] Re: How to implement WebRTC as a Git Protocol?

2022-02-21 Thread Philip Oakley
Hi Git Noob,

Supplemental to Konstantin's info, there is further details of the various 
protocols in the 
https://github.com/git/git/tree/master/Documentation/technical directory to 
complement the man pages.

Hope that helps

On Monday, February 21, 2022 at 10:46:45 AM UTC Konstantin Khomoutov wrote:

> On Sat, Feb 19, 2022 at 11:42:33AM -0800, git noob wrote:
>
> > > https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
> > > https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols
> > >
> > > Is there a way to use plumbing commands (internal transfer protocols?) 
> to 
> > > implement your own Git protocol over WebRTC? If you could somehow 
> generate 
> > > all the files necessary to update your Git repository ('git pull') and 
> > > instead of sending them over a standard protocol, you would use WebRTC 
> data 
> > > channels to send that data instead. And on the receiving end, use the 
> > > received files to update your repo.
> > >
> > > Or maybe there already exists a Git-over-WebRTC library?
>
> I do not know of any.
> I also honestly doubt about the suitability of WebRTC for the intended 
> task.
> I mean, not that it will not be able to carry out that task; just I cannot 
> see
> how it will be better at it than what's already there.
>
> > I did find this link about remote helpers and 'git fetch'. Is this what 
> I 
> > should be investigating?:
> > 
> > 
> https://stackoverflow.com/questions/17876132/can-i-create-a-custom-protocol-for-git
>
> You're about to implement something in Git.
> Why, then, are you reading the 'net and StackOverflow instead of the Git's
> source code, which is freely available?
>
> I mean, you would not avoid dealing with it anyway - basically because a
> data transport is never a simple plug-and-play thing: at least the part of 
> the
> code which deals with URLs of remote repositories must be able to tell 
> which
> transport to use from a given URL.
>
> As to implementing a custom transport, it worth building a correct mental
> model of how Git data exchange happens. You should probably start with 
> reading
> manual pages on `git send-pack` and `git receive-pack` programs, and in
> general start with reading the root Git manual page (run `git help git`) 
> and
> especially its section titled "Syncing repositories" which refers to the
> plumbing commands which carry out different ways to exchange data in Git.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/1ccd94d4-8624-403f-823e-3e86fe1cf42fn%40googlegroups.com.


Re: [git-users] Re: How to implement WebRTC as a Git Protocol?

2022-02-21 Thread Konstantin Khomoutov
On Sat, Feb 19, 2022 at 11:42:33AM -0800, git noob wrote:

> > https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
> > https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols
> >
> > Is there a way to use plumbing commands (internal transfer protocols?) to 
> > implement your own Git protocol over WebRTC? If you could somehow generate 
> > all the files necessary to update your Git repository ('git pull') and 
> > instead of sending them over a standard protocol, you would use WebRTC data 
> > channels to send that data instead. And on the receiving end, use the 
> > received files to update your repo.
> >
> > Or maybe there already exists a Git-over-WebRTC library?

I do not know of any.
I also honestly doubt about the suitability of WebRTC for the intended task.
I mean, not that it will not be able to carry out that task; just I cannot see
how it will be better at it than what's already there.

> I did find this link about remote helpers and 'git fetch'. Is this what I 
> should be investigating?:
> 
> https://stackoverflow.com/questions/17876132/can-i-create-a-custom-protocol-for-git

You're about to implement something in Git.
Why, then, are you reading the 'net and StackOverflow instead of the Git's
source code, which is freely available?

I mean, you would not avoid dealing with it anyway - basically because a
data transport is never a simple plug-and-play thing: at least the part of the
code which deals with URLs of remote repositories must be able to tell which
transport to use from a given URL.

As to implementing a custom transport, it worth building a correct mental
model of how Git data exchange happens. You should probably start with reading
manual pages on `git send-pack` and `git receive-pack` programs, and in
general start with reading the root Git manual page (run `git help git`) and
especially its section titled "Syncing repositories" which refers to the
plumbing commands which carry out different ways to exchange data in Git.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/20220221104638.nz3yb45vf7ox4pcw%40carbon.


Re: [git-users] Re: How to print out a git repo (local)

2021-12-22 Thread Konstantin Khomoutov
On Wed, Dec 22, 2021 at 08:43:16AM -0800, David McMurrey wrote:

> Okay,  let's say each of my committed files is a chapter in a book, or each 
> committed file is some piece of Perl code I'm writing. I want to see the 
> actual HTML page or Perl code ready to use. 
> 
> I think my answer is that the actual files in the working directory are the 
> ones I want to keep and use. I just pull them together say in HTML or Perl 
> and away we go! I think I  assumed that, once committed, you threw away 
> those files in the working directory. Wrong, right?

Well, I think I understand what you're trying to convey.

Let's perform a very basic dive into the Git's "data model", and I think
you'll figure out what you want by yourself.

What Git does is tracking changes made to sets of files.

Sets of files on today's commodity computers are usually organized as
directories (also sometimes named "folders") on filesystems; when being a
layman person with regard to computers, you might be unaware about the concept
of a filesystem but it's hard to avoid dealing with files placed inside
folders, right? ;-)

Central to Git data model is the concept of a repository. A repository is what
is managing a set of files put under the Git's control. You can think of this
as a single folder with one or more files in it (and maybe also subfolders
with other files under that, and so on, and so on) - with Git allowing to
take snapshots of the states of the whole contents of that single folder,
with all the contained files and subfolders, and files in them.
When you commit in Git, Git records such a snapshot, storing it permanently
in the repository in which that commit was made.

Recording a commit does nothing to the files. Creating a snapshot of the
states of the local files does not somehow "suck them into" such snapshot:
committing merely reads the data of the files and stores them into the
repository. In other words, this operation is completely read-only for the
local files.


So, back to your question.
Suppose we're writing a document using LaTeX. It might consist of a set of
files containing actual document's text and markup, and also may be files
defining custom packages, styles etc.
You can run any of the tools shipped by LaTeX to compile a final printable
document (such as in PDF format) from your source files. In a sense, that
document will be the end result of your work but that is not what you manage
with Git - you manage the "source" files, as it's they what matter because you
can rebuild the final document any time given the source files are there.

And now let's consider

> I really appreciate your help, Philip and Matt. It's hard to get away from 
> the files-in-a-directory perspective!

...as you can see, Git _does_ precisely use the files-in-a-directory
concept -  it just adds "another dimension" to it: it's able to take snapshots
of such set of files to allow you to return to any of them, compare them
between each other, inspect them etc.


Since you appear to be really new to the concept of version control, I'd
highly recommend to start with the venerable Git Parable [1] which explains
the core concepts behind Git in a really gentle manner.

 1. https://tom.preston-werner.com/2009/05/19/the-git-parable.html

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/20211222184504.juo5obhnsrzqwtjd%40carbon.


Re: [git-users] Re: How to make git work!

2020-05-06 Thread rhkramer
On Wednesday, May 06, 2020 03:06:12 AM SJW wrote:
> In the grand scheme of things - it probably doesn't matter but from a
> cleanliness point of view, I'd prefer to not have to commit comment
> changes...

From the peanut gallery: if you don't commit comment changes, how would you 
expect them to get into the repository (if that is the right word)?


Re: [git-users] Re: How to make git work!

2020-05-04 Thread Alexandra Vass
Hey,

With "git add ." you just add files in your local directory. (I terribly
hate when people use it if they are beginner with git, because they don't
get how git works yet.)

You can't amend a commit which is not on your computer, which is expected,
since than you could modify others commit too.
It also gives you an error message you branch and the remote's branch
differs which is also expected.
So the 3 commits are expected.

If you you don't know what you doing, firs read the Pro git book. It's
quite a big book but it explains everything and it can be finished much
faster if you skip some not useful chapters. (Like how to move to git from
svn and so on.)

Regards,
Alexa





On Tue, May 5, 2020, 04:05 SJW  wrote:

> Cant edit post.
>
> Here is the commit log -  i was expecting/hoping for a single commit -
> instead I have 4 
>
> $ git log
> commit 0988bf8f5a165a6e213982cfcf0733ccb3452101
> Author: XXX
> Date:   Tue May 5 12:00:28 2020 +1000
>
>
> Trying to fix the merge issues that were created from 
>
>
> commit a32b8a94f3baef1264e7f17993fe79063a057736
> Merge: 54c1612 0cc8698
> Author: XXX
> Date:   Tue May 5 11:28:58 2020 +1000
>
>
> Merge branch 'master' of https://gitlab.com/SJWGL/project
>
>
> commit 54c1612be8c645fb14ca456bb56fa7b1979db9c7
> Author: XXX
> Date:   Tue May 5 10:16:30 2020 +1000
>
>
> Updates...
>
>
> commit 0cc8698b634303b68e8a8568af503ed7576e3cc2
> Author: XXX
> Date:   Tue May 5 10:16:30 2020 +1000
>
>
> Updates...
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/git-users/fadba795-f121-40bc-ae31-159975be4aee%40googlegroups.com
> 
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/CAErL4gj9wH502Y45K4mUBsRXqX_fkxWcN760XVgeGjeG5W%2B8tQ%40mail.gmail.com.


Re: [git-users] Re: how to make a 'git add --patch' using --word-diff?

2018-05-23 Thread Philip Oakley

There has been a recent bit of movement on the Git list regardin "git
add -p".

See
https://public-inbox.org/git/20180316101346.7137-1-phillip.w...@talktalk.net/
which may give you an option to discuss this ...

Subject: [PATCH v3 0/3] add -p: select individual hunk lines

- Original Message - 
From: "Frederik Hanghøj Iversen" 

To: "Git for human beings" 
Sent: Wednesday, May 23, 2018 4:31 PM
Subject: [git-users] Re: how to make a 'git add --patch' using --word-diff?



Hey Joe

I'm interested in this feature as well, I was curious if you ever did
request this feature as per Thomas' suggestion.

Sorry for waking this thread up from the dead.

On Monday, October 29, 2012 at 10:44:51 AM UTC+1, Thomas Ferris Nicolaisen
wrote:


On Monday, October 29, 2012 1:02:22 AM UTC+1, Joe Cabezas wrote:


my project have files with very large lines (very common in latex
projects), sometimes i have to modify a single word, and is very simple
to
see differences using

git diff --word-diff

but when I want to make a

git add --patch

show hunks like 'git diff' without --word-diff option... and is very
difficult to see whats is the difference


there is any way to see differences word by word in git add?



I doubt this is possible today. As far as I can judge from reading the
docs, git add -p uses the Interactive Mode of git add, which operates on
"hunks". Hunks *are* inherently line diffs, and can even be edited on the
fly during an interactive add, and I guess this is why they can't be
handled as mere diffs.

Of course, this should be possible to implement inside of Git, but I
doubt
it's a feature in high demand.. Most users out there don't stage hunks,
and
most people who do are already used to line-diffs.

You could of course suggest it as a feature to the Git development list.
In the mean time, I would suggest combining two console windows to
achieve
what you want:

   - in the first window, run git add -p, and
   - in the second run git diff --word-diff to guide you through the
   process.




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



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


Re: [git-users] Re: How hard would it be to implement sparse fetching/pulling?

2017-11-30 Thread Philip Oakley
The Git List  has some strict anti-spam / anti-bloat 
rules.


The emails must be plain text, absolutely no HTML, no banned words. Plus 
there appears to be an initial moderation of a few hours (up to a day?).


The hardest bit is ensuring plain text. And the list uses 'reply all' so 
that those not subscribed are included.


I just posted a reply to the thread in the Git list, 
https://public-inbox.org/git/C89EEDA4D8F84C6290111C04ADAE6872@PhilipOakley/ 
on my thoughts.


Philip

- Original Message - 
From: "vit via Git for human beings" 

To: "Git for human beings" 
Sent: Thursday, November 30, 2017 4:13 PM
Subject: [git-users] Re: How hard would it be to implement sparse 
fetching/pulling?



Konstantin, thanks for mentioning that. Unfortunately I've asked a 
question

here first and mail server didn't let me send a link to this thread.

Jeff, thanks, that's super exciting. I will check it out.

Is it best to continue discussion here as this thread has all relevant
context?


On Thursday, November 30, 2017 at 7:54:46 AM UTC-8,
jeff.ho...@microsoft.com wrote:



This question was cross-posted on the main git mailing list.

For completeness with the git-users mailing list here.
The following describes info on the work-in-progress for this feature.
*https://public-inbox.org/git/e2d5470b-9252-07b4-f3cf-57076d103...@jeffhostetler.com/* 







--
You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



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


Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-13 Thread Igor Djordjevic
On Thursday, July 13, 2017 at 10:54:38 PM UTC+2, Philip Oakley wrote:

> I just want to comment on Buga's 
> > It`s not about what you retain, but what you drop -- with "checkout 
> --ours/theirs", you effectively drop all the changes from one of the 
> branches, and I didn`t get the impression that`s what the user wanted, as 
> he never mentioned that.
>  
> statement.
>  
> The "--ours/--theirs" options are not what we think they are!
>  
> They say that we should fully merge everything in the normal way, and only 
> if we have some minor local conflicts then Git should be biased to one side 
> or the other in terms of performing a perfect, *apparently* conflict-free, 
> merge.
>  
> So what you get is everyhing on master, and everything on INT, with just a 
> little bit of master's code missing where INT won coin toss (or the opposit 
> for the other option). 
>  
> I too had that misunderstanding for a while.
>

Just pay attention that we are talking about `git *checkout *--theirs 
` here for solving conflicts that already appeared after `git merge`, 
in which case you nuke all the changes from one side, even those that would 
have otherwise be accepted through `git *merge *--strategy-option=theirs`, 
which seems to be what you`re talking about. It`s not the same.

And in case you`re not absolutely sure what you want to accomplish, `git 
merge --strategy-option=theirs` may be even worse, as you end up with some 
parts being merged cleanly from both sides (where there were no conflicts), 
and some parts totally dropping one of the sides (where conflicts 
appeared), as you already pointed out.

Regards,
Buga

- Original Message - 
> *From:* Igor Djordjevic  
> *To:* Git for human beings  
> *Sent:* Thursday, July 13, 2017 8:58 PM
> *Subject:* Re: [git-users] Re: How to avoid merge conflicts while merging 
> INT changes into Master
>
> On Thursday, July 13, 2017 at 6:13:44 AM UTC+2, Maheshwaran A N wrote: 
>>
>> On Thursday, 13 July 2017 03:27:06 UTC+5:30, Igor Djordjevic wrote: 
>>>
>>> On Wednesday, July 12, 2017 at 6:38:35 PM UTC+2, Yubin Ruan wrote: 
>>>>
>>>> 2017-07-12 20:40 GMT+08:00 Maheshwaran A N <avpal...@gmail.com>: 
>>>>
>>> > On Tuesday, 11 July 2017 07:36:47 UTC+5:30, Anjaiah Yamagani wrote: 
>>>> >> 
>>>> >> Hi Team, 
>>>> >> 
>>>> >> I have very quick question - as I'm new to the git 
>>>> >> 
>>>> >> we have master branch. 
>>>> >> 
>>>> >> and checked out the INT branch from the master, worked on the INT 
>>>> for an 
>>>> >> month and all the developers pushed the code to INT , obviously INT 
>>>> branch 
>>>> >> ahead of comments then the master. 
>>>> >> 
>>>> >> Now while we try to push the code to the Master it shows conflicts, 
>>>> how to 
>>>> >> avoid this. 
>>>> >> 
>>>> >> at this stage I do not want to see the conflicts and work with the 
>>>> >> developers at this stage and resolve the merge conflicts. 
>>>> >> 
>>>> >> can you suggest are we doing any wrong thing here. 
>>>> >> 
>>>> >> Regards, 
>>>> >> Anjaiah
>>>
>>> >
>>>
>>> > I suppose you are trying to execute the below commands. 
>>>> > 
>>>> > git checkout master 
>>>> > git merge origin/INT (taking changes from remote branch)  or git 
>>>> merge INT 
>>>> > (merge with local changes) 
>>>> > At this point you would have faced the conflicts. 
>>>> > In this case, if you want to retain the changes of INT, you can take 
>>>> the 
>>>> > changes from INT and apply it in master without opening the file and 
>>>> solving 
>>>> > the conflicts. Execute the below command 
>>>> > 
>>>> > git checkout --theirs  
>>>>
>>>> wow, wasn't aware of that! Many thanks! 
>>>>
>>>> /Yubin 
>>>>
>>>> > git add  
>>>> > 
>>>> > Now, you can check in master branch for INT contents for conflicted 
>>>> file. 
>>>>
>>>
>>> I`m not sure how this helps resolving merge conflicts, as it doesn`t 
>>> only retain all changes from INT, but effectively nukes all changes from 
>>> master branch and just takes INT branch file state as-is -- so you`re not 
>

Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-13 Thread Philip Oakley
I just want to comment on Buga's 
> It`s not about what you retain, but what you drop -- with "checkout 
> --ours/theirs", you effectively drop all the changes from one of the 
> branches, and I didn`t get the impression that`s what the user wanted, as he 
> never mentioned that.

statement.

The "--ours/--theirs" options are not what we think they are!

They say that we should fully merge everything in the normal way, and only if 
we have some minor local conflicts then Git should be biased to one side or the 
other in terms of performing a perfect, *apparently* conflict-free, merge.

So what you get is everyhing on master, and everything on INT, with just a 
little bit of master's code missing where INT won coin toss (or the opposit for 
the other option).


I too had that misunderstanding for a while.

Philip
  - Original Message - 
  From: Igor Djordjevic 
  To: Git for human beings 
  Sent: Thursday, July 13, 2017 8:58 PM
  Subject: Re: [git-users] Re: How to avoid merge conflicts while merging INT 
changes into Master


  On Thursday, July 13, 2017 at 6:13:44 AM UTC+2, Maheshwaran A N wrote:
On Thursday, 13 July 2017 03:27:06 UTC+5:30, Igor Djordjevic wrote:
  On Wednesday, July 12, 2017 at 6:38:35 PM UTC+2, Yubin Ruan wrote:
2017-07-12 20:40 GMT+08:00 Maheshwaran A N <avpal...@gmail.com>: 

> On Tuesday, 11 July 2017 07:36:47 UTC+5:30, Anjaiah Yamagani wrote: 
>> 
>> Hi Team, 
>> 
>> I have very quick question - as I'm new to the git 
>> 
>> we have master branch. 
>> 
>> and checked out the INT branch from the master, worked on the INT 
for an 
>> month and all the developers pushed the code to INT , obviously INT 
branch 
>> ahead of comments then the master. 
>> 
>> Now while we try to push the code to the Master it shows conflicts, 
how to 
>> avoid this. 
>> 
>> at this stage I do not want to see the conflicts and work with the 
>> developers at this stage and resolve the merge conflicts. 
>> 
>> can you suggest are we doing any wrong thing here. 
>> 
>> Regards, 
>> Anjaiah
>
> I suppose you are trying to execute the below commands. 
> 
> git checkout master 
> git merge origin/INT (taking changes from remote branch)  or git 
merge INT 
> (merge with local changes) 
> At this point you would have faced the conflicts. 
> In this case, if you want to retain the changes of INT, you can take 
the 
> changes from INT and apply it in master without opening the file and 
solving 
> the conflicts. Execute the below command 
> 
> git checkout --theirs  

wow, wasn't aware of that! Many thanks! 

/Yubin 

> git add  
> 
> Now, you can check in master branch for INT contents for conflicted 
file. 



  I`m not sure how this helps resolving merge conflicts, as it doesn`t only 
retain all changes from INT, but effectively nukes all changes from master 
branch and just takes INT branch file state as-is -- so you`re not "applying it 
in master", but deleting master changes altogether.


  Doing this is dangerous, unless you really want to drop all master branch 
changes that happened since you branched your INT branch...


  Am I missing something?


  If this is exactly what you wanted to point out (dropping all master 
changes and taking INT file as-is), then let this be just an additional note of 
warning for those that might have missed it, as the original question seems 
concerned with solving something else - a real merge conflict situation, and 
this answer doesn`t seem to help there. 


  Regards,
  Buga 

Requirement is to keep all the changes of INT. When you have multiple files 
to solve the conflicts and you very well know which branch to retain, then why 
not use ours/theirs? Whats dangerous here? User is very clear on what needs to 
be retained. 


  It`s not about what you retain, but what you drop -- with "checkout 
--ours/theirs", you effectively drop all the changes from one of the branches, 
and I didn`t get the impression that`s what the user wanted, as he never 
mentioned that.


  He didn`t say he wants to retain INT changes in favor of master (loosing 
master branch changes after the merge), but was merely asking how to deal with 
merge conflicts which he doesn`t want to deal with _at the moment_ -- and I`m 
afraid there`s no easy answer to this, as Philip already pointed out.


  "Resolving" merge conflicts by using "checkout --theirs", he would drop all 
the changes from mas

Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-13 Thread Igor Djordjevic
On Thursday, July 13, 2017 at 6:13:44 AM UTC+2, Maheshwaran A N wrote:
>
> On Thursday, 13 July 2017 03:27:06 UTC+5:30, Igor Djordjevic wrote:
>>
>> On Wednesday, July 12, 2017 at 6:38:35 PM UTC+2, Yubin Ruan wrote:
>>>
>>> 2017-07-12 20:40 GMT+08:00 Maheshwaran A N : 
>>>
>> > On Tuesday, 11 July 2017 07:36:47 UTC+5:30, Anjaiah Yamagani wrote: 
>>> >> 
>>> >> Hi Team, 
>>> >> 
>>> >> I have very quick question - as I'm new to the git 
>>> >> 
>>> >> we have master branch. 
>>> >> 
>>> >> and checked out the INT branch from the master, worked on the INT for 
>>> an 
>>> >> month and all the developers pushed the code to INT , obviously INT 
>>> branch 
>>> >> ahead of comments then the master. 
>>> >> 
>>> >> Now while we try to push the code to the Master it shows conflicts, 
>>> how to 
>>> >> avoid this. 
>>> >> 
>>> >> at this stage I do not want to see the conflicts and work with the 
>>> >> developers at this stage and resolve the merge conflicts. 
>>> >> 
>>> >> can you suggest are we doing any wrong thing here. 
>>> >> 
>>> >> Regards, 
>>> >> Anjaiah
>>
>> >
>>
>> > I suppose you are trying to execute the below commands. 
>>> > 
>>> > git checkout master 
>>> > git merge origin/INT (taking changes from remote branch)  or git merge 
>>> INT 
>>> > (merge with local changes) 
>>> > At this point you would have faced the conflicts. 
>>> > In this case, if you want to retain the changes of INT, you can take 
>>> the 
>>> > changes from INT and apply it in master without opening the file and 
>>> solving 
>>> > the conflicts. Execute the below command 
>>> > 
>>> > git checkout --theirs  
>>>
>>> wow, wasn't aware of that! Many thanks! 
>>>
>>> /Yubin 
>>>
>>> > git add  
>>> > 
>>> > Now, you can check in master branch for INT contents for conflicted 
>>> file. 
>>>
>>
>> I`m not sure how this helps resolving merge conflicts, as it doesn`t only 
>> retain all changes from INT, but effectively nukes all changes from master 
>> branch and just takes INT branch file state as-is -- so you`re not 
>> "applying it in master", but deleting master changes altogether.
>>
>> Doing this is dangerous, unless you really want to drop all master branch 
>> changes that happened since you branched your INT branch...
>>
>> Am I missing something?
>>
>> If this is exactly what you wanted to point out (dropping all master 
>> changes and taking INT file as-is), then let this be just an additional 
>> note of warning for those that might have missed it, as the original 
>> question seems concerned with solving something else - a real merge 
>> conflict situation, and this answer doesn`t seem to help there. 
>>
>> Regards,
>> Buga 
>>
>  

Requirement is to keep all the changes of INT. When you have multiple files 
> to solve the conflicts and you very well know which branch to retain, then 
> why not use ours/theirs? Whats dangerous here? User is very clear on what 
> needs to be retained. 


It`s not about what you retain, but what you drop -- with "checkout 
--ours/theirs", you effectively drop all the changes from one of the 
branches, and I didn`t get the impression that`s what the user wanted, as 
he never mentioned that.

He didn`t say he wants to retain INT changes in favor of master (loosing 
master branch changes after the merge), but was merely asking how to deal 
with merge conflicts which he doesn`t want to deal with _at the moment_ -- 
and I`m afraid there`s no easy answer to this, as Philip already pointed 
out.

"Resolving" merge conflicts by using "checkout --theirs", he would drop all 
the changes from master, not for the moment, but _for good_, and he should 
be aware of that -- again, as it doesn`t seem that`s what he wanted, thus 
it`s dangerous to propose without explaining all the implications.
 

> Also, if you retain INT content, there is no much impact in master since 
> INT is branched out from master as a base(Ideally, master is untouched). 
> Therefore, INT is master+newcontents and i hope thats well tested in INT 
> branch itself. 
>

But it`s already pointed out that master is not untouched, otherwise there 
would be no merge conflicts in the first place...

Therefore, if you merge INT to master (both being changed), resolving 
conflicts using "checkout --theirs" (taking INT over master), then INT will 
be _INT only_ wherever there was a conflict with master -- meaning all the 
file changes on the master side will be dropped.

It doesn`t matter that INT was branched off master, as they both progressed 
in the meantime... thus the merge conflicts.

Let me use an example:

(*1*) ---A---B---F---G---M (master)
\ /
 C---D---E (INT)

This shows the situation the user is having -- both branches progressed 
since branching in commit B, and now merging "INT" to "master" in M raises 
conflicts.

To make it simple, lets say the project has only one file "main.c" which 
has been modified in each commit.

In this situation, if you resolve conflicts by 

Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-12 Thread Maheshwaran A N
Requirement is to keep all the changes of INT. When you have multiple files 
to solve the conflicts and you very well know which branch to retain, then 
why not use ours/theirs? Whats dangerous here? User is very clear on what 
needs to be retained. Also, if you retain INT content, there is no much 
impact in master since INT is branched out from master as a base(Ideally, 
master is untouched). Therefore, INT is master+newcontents and i hope thats 
well tested in INT branch itself. 

And, the original question is concerned with solving merge conflicts. I 
guess ours/theirs solves the purpose. 

Regards,
Mahe

On Thursday, 13 July 2017 03:27:06 UTC+5:30, Igor Djordjevic wrote:
>
> On Wednesday, July 12, 2017 at 6:38:35 PM UTC+2, Yubin Ruan wrote:
>>
>> 2017-07-12 20:40 GMT+08:00 Maheshwaran A N : 
>>
> > On Tuesday, 11 July 2017 07:36:47 UTC+5:30, Anjaiah Yamagani wrote: 
>> >> 
>> >> Hi Team, 
>> >> 
>> >> I have very quick question - as I'm new to the git 
>> >> 
>> >> we have master branch. 
>> >> 
>> >> and checked out the INT branch from the master, worked on the INT for 
>> an 
>> >> month and all the developers pushed the code to INT , obviously INT 
>> branch 
>> >> ahead of comments then the master. 
>> >> 
>> >> Now while we try to push the code to the Master it shows conflicts, 
>> how to 
>> >> avoid this. 
>> >> 
>> >> at this stage I do not want to see the conflicts and work with the 
>> >> developers at this stage and resolve the merge conflicts. 
>> >> 
>> >> can you suggest are we doing any wrong thing here. 
>> >> 
>> >> Regards, 
>> >> Anjaiah
>
> >
>
> > I suppose you are trying to execute the below commands. 
>> > 
>> > git checkout master 
>> > git merge origin/INT (taking changes from remote branch)  or git merge 
>> INT 
>> > (merge with local changes) 
>> > At this point you would have faced the conflicts. 
>> > In this case, if you want to retain the changes of INT, you can take 
>> the 
>> > changes from INT and apply it in master without opening the file and 
>> solving 
>> > the conflicts. Execute the below command 
>> > 
>> > git checkout --theirs  
>>
>> wow, wasn't aware of that! Many thanks! 
>>
>> /Yubin 
>>
>> > git add  
>> > 
>> > Now, you can check in master branch for INT contents for conflicted 
>> file. 
>>
>
> I`m not sure how this helps resolving merge conflicts, as it doesn`t only 
> retain all changes from INT, but effectively nukes all changes from master 
> branch and just takes INT branch file state as-is -- so you`re not 
> "applying it in master", but deleting master changes altogether.
>
> Doing this is dangerous, unless you really want to drop all master branch 
> changes that happened since you branched your INT branch...
>
> Am I missing something?
>
> If this is exactly what you wanted to point out (dropping all master 
> changes and taking INT file as-is), then let this be just an additional 
> note of warning for those that might have missed it, as the original 
> question seems concerned with solving something else - a real merge 
> conflict situation, and this answer doesn`t seem to help there. 
>
> Regards,
> Buga
>

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


Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-12 Thread Igor Djordjevic
On Wednesday, July 12, 2017 at 6:38:35 PM UTC+2, Yubin Ruan wrote:
>
> 2017-07-12 20:40 GMT+08:00 Maheshwaran A N  >: 
>
> On Tuesday, 11 July 2017 07:36:47 UTC+5:30, Anjaiah Yamagani wrote: 
> >> 
> >> Hi Team, 
> >> 
> >> I have very quick question - as I'm new to the git 
> >> 
> >> we have master branch. 
> >> 
> >> and checked out the INT branch from the master, worked on the INT for 
> an 
> >> month and all the developers pushed the code to INT , obviously INT 
> branch 
> >> ahead of comments then the master. 
> >> 
> >> Now while we try to push the code to the Master it shows conflicts, how 
> to 
> >> avoid this. 
> >> 
> >> at this stage I do not want to see the conflicts and work with the 
> >> developers at this stage and resolve the merge conflicts. 
> >> 
> >> can you suggest are we doing any wrong thing here. 
> >> 
> >> Regards, 
> >> Anjaiah

>

> I suppose you are trying to execute the below commands. 
> > 
> > git checkout master 
> > git merge origin/INT (taking changes from remote branch)  or git merge 
> INT 
> > (merge with local changes) 
> > At this point you would have faced the conflicts. 
> > In this case, if you want to retain the changes of INT, you can take the 
> > changes from INT and apply it in master without opening the file and 
> solving 
> > the conflicts. Execute the below command 
> > 
> > git checkout --theirs  
>
> wow, wasn't aware of that! Many thanks! 
>
> /Yubin 
>
> > git add  
> > 
> > Now, you can check in master branch for INT contents for conflicted 
> file. 
>

I`m not sure how this helps resolving merge conflicts, as it doesn`t only 
retain all changes from INT, but effectively nukes all changes from master 
branch and just takes INT branch file state as-is -- so you`re not 
"applying it in master", but deleting master changes altogether.

Doing this is dangerous, unless you really want to drop all master branch 
changes that happened since you branched your INT branch...

Am I missing something?

If this is exactly what you wanted to point out (dropping all master 
changes and taking INT file as-is), then let this be just an additional 
note of warning for those that might have missed it, as the original 
question seems concerned with solving something else - a real merge 
conflict situation, and this answer doesn`t seem to help there. 

Regards,
Buga

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


Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-12 Thread Yubin Ruan
2017-07-12 20:40 GMT+08:00 Maheshwaran A N :
> I suppose you are trying to execute the below commands.
>
> git checkout master
> git merge origin/INT (taking changes from remote branch)  or git merge INT
> (merge with local changes)
> At this point you would have faced the conflicts.
> In this case, if you want to retain the changes of INT, you can take the
> changes from INT and apply it in master without opening the file and solving
> the conflicts. Execute the below command
>
> git checkout --theirs 

wow, wasn't aware of that! Many thanks!

/Yubin

> git add 
>
> Now, you can check in master branch for INT contents for conflicted file.
>
>
>
> On Tuesday, 11 July 2017 07:36:47 UTC+5:30, Anjaiah Yamagani wrote:
>>
>> Hi Team,
>>
>> I have very quick question - as I'm new to the git
>>
>> we have master branch.
>>
>> and checked out the INT branch from the master, worked on the INT for an
>> month and all the developers pushed the code to INT , obviously INT branch
>> ahead of comments then the master.
>>
>> Now while we try to push the code to the Master it shows conflicts, how to
>> avoid this.
>>
>> at this stage I do not want to see the conflicts and work with the
>> developers at this stage and resolve the merge conflicts.
>>
>> can you suggest are we doing any wrong thing here.
>>
>> Regards,
>> Anjaiah
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: [git-users] Re: How to get a highly complex branch straight?

2017-05-02 Thread mah


Am Dienstag, 2. Mai 2017 21:07:18 UTC+2 schrieb Philip Oakley:
>
>  
> I think you may have had expectations which were too high. Git can not do 
> magic. 
>

All I'm asking for is to replay the already recorded history. Shouldn't 
require magic.
 

> I think your project had two lines of development which forked and then 
> ran independently. The two forks each had their own branch-merge processes 
> in place (so each line has merges on it, but no cross merges between the 
> two forks). [...] This assumes you want to see a progressive 'zipping 
> together' of the two development streams (picking the best of each).
>

Yes, this describes it perfectly, thank you.
 

> The Mikado method [2] is one approach to avoiding a merge hell of trying 
> to do everything at once.
>

Here's another method I use for several years already, with great success: 
https://github.com/Traumflug/Teacup_Firmware/issues/81 Does not require to 
read a book, but does require a branch to be rebase-able.


Markus

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


Re: [git-users] Re: How to get a highly complex branch straight?

2017-05-02 Thread mah


Am Dienstag, 2. Mai 2017 19:30:33 UTC+2 schrieb Michael Gersten:
>
>
> On 2017-05-02, at 10:22 AM, m...@jump-ing.de  wrote:
>
> Now I have a branch with 4700 commits on it, but zero merges. Diff melted 
> down to 3800 lines. That's something I can work with.
>
> Go home message: merges are evil!
>
>
> A better take-home message should be about how to prevent this from 
> happening in the future.
>

Preventing that is simple: don't merge. Or allow fast-forward merges, only. 
As soon as there are merges in a branch, one can no longer rebase it. 

What I don't understand, exactly, is "a branch with 4700 commits but zero 
> merges". I thought that merging was the goal here?
>

The goal is to do a simple rebase of this branch onto it's own. Like 'git 
rebase HEAD~1500'. As soon as this works, one can do interactive rebases, 
which allows to filter away the unwanted parts. And later rebasing wanted 
parts onto trunk (master), of course.

I'm perfectly aware that some 80% of Git users merge often. Github offers 
pull requests as merges, only. Still merges get one into the mess described 
above if one wants to do something useful with the recorded history other 
than just staring at it.

If you want to see a Git repo with zero merges for years and still a lot of 
collaborative development, see https://github.com/Traumflug/Teacup_Firmware 
Topic branches are rebased to latest trunk (branch 'experimental', in this 
case), then they get cherry-picked over, or trunk is rebased to the tip of 
the topic branch (which gives the same result either way).

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


Re: [git-users] Re: How to get a highly complex branch straight?

2017-05-02 Thread Philip Oakley
Hi @mah,

I think you may have had expectations which were too high. Git can not do 
magic. 

The problem of product branches that divereged a long while ago is not new. 
Even when the two product teams claim that their respective code bases have 
converged they are rarely anywhere near each other for merging (automated 
computer merges). Usually it is just the user visible portions that look 
similar - underneath there are vast differences[0].

The learning message should be that one should "merge early, merge often and 
merge small chunks" (and have automated test to check it all still works;-).

The problem is usually that the lesson isn't headed at the beginning and the 
technical debt is allowed to build up.[1]

The other problem here is one of terminology. We usually do not have consistent 
terms to describe the problem well. I think your project had two lines of 
development which forked and then ran independently. The two forks each had 
their own branch-merge processes in place (so each line has merges on it, but 
no cross merges between the two forks).

.At tha point you would need to do a bit a forensics to identify in each of the 
development lines the useful refernce points (releases/tags/etc) that can be 
used for comparison. By limiting the number of commits that will be compared 
you will have less conflicts to resolve (solve once and move on). This assumes 
you want to see a progressive 'zipping together' of the two development streams 
(picking the best of each).

The Mikado method [2] is one approach to avoiding a merge hell of trying to do 
everything at once.

However if you have found a method that works for you (and others on the other 
line of development) then that is all to the good. It's never easy 
rationalising disparate code bases.

Summary
===

"merge early, merge often and merge small chunks".

--
Philip

[0] white space; blank lines; bracket placement; variable names; function 
names; loop control; ..; features implemented; OSes supported;.. on it goes.
[1] Youth is wasted on the young, and wisdom wasted on the old; Or something 
like that. Hindsight is wonderful.
[2] Mikado method, 
https://www.amazon.co.uk/d/cka/Mikado-Method-Ola-Ellnestam/1617291218 
https://mikadomethod.wordpress.com/
  - Original Message - 
  From: Michael 
  To: git-users@googlegroups.com 
  Sent: Tuesday, May 02, 2017 6:30 PM
  Subject: Re: [git-users] Re: How to get a highly complex branch straight?




  On 2017-05-02, at 10:22 AM, m...@jump-ing.de wrote:



As nobody knew an answer, so I started trying rebase strategies (-s, -X 
options), one by one. Using 'git rebase -s recursive -X ours ...' was the only 
one which did something useful for this self-rebase and also worked with a 
mangeable set of conflicts (only ones including a file deletion), so I got away 
with resolving some 30 conflicts with 'git rm ...'. Now I have a branch with 
4700 commits on it, but zero merges. Diff melted down to 3800 lines. That's 
something I can work with.

Go home message: merges are evil!



  Merges should not be evil. Something really odd was going on here.


  A better take-home message should be about how to prevent this from happening 
in the future.


  What I don't understand, exactly, is "a branch with 4700 commits but zero 
merges". I thought that merging was the goal here?






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



  ---
  Entertaining minecraft videos
  http://YouTube.com/keybounce



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

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


Re: [git-users] Re: How to get a highly complex branch straight?

2017-05-02 Thread Michael

On 2017-05-02, at 10:22 AM, m...@jump-ing.de wrote:

> 
> As nobody knew an answer, so I started trying rebase strategies (-s, -X 
> options), one by one. Using 'git rebase -s recursive -X ours ...' was the 
> only one which did something useful for this self-rebase and also worked with 
> a mangeable set of conflicts (only ones including a file deletion), so I got 
> away with resolving some 30 conflicts with 'git rm ...'. Now I have a branch 
> with 4700 commits on it, but zero merges. Diff melted down to 3800 lines. 
> That's something I can work with.
> 
> Go home message: merges are evil!

Merges should not be evil. Something really odd was going on here.

A better take-home message should be about how to prevent this from happening 
in the future.

What I don't understand, exactly, is "a branch with 4700 commits but zero 
merges". I thought that merging was the goal here?


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

---
Entertaining minecraft videos
http://YouTube.com/keybounce

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


Re: [git-users] Re: How to make pack remote repository on every push?

2016-01-07 Thread Gergely Polonkai
Another solution could be running git-repack. This SO answer[1] has some
nice details on it.

Best,
Gergely

[1] http://stackoverflow.com/a/8638219
On 8 Jan 2016 02:29, "Steinar Bang"  wrote:

> > Gergely Polonkai :
>
> > You may want to play with gc.pruneexpire. From man git-config:
>
> >gc.pruneexpire
> >When git gc is run, it will call prune --expire 2.weeks.ago.
> >Override the grace period with this config variable. The value
> >"now" may be used to disable this grace period and always
> prune
> >unreachable objects immediately.
>
>
> This seemed to work the first time on one of my repositories (the
> longest lived one), so I thought this did the trick, but hasn't worked
> on later pushes, unfortunately...:-/
>
> To summarize:
> I have two different git repositores containing org-mode files.  One of
> these repositories use git+ssh and has a history going back 6 years with
> 708 commits, and one using https and with a history going back 8 months
> and 37 commits.
>
> I have set the values
>  gc.auto=1
>  gc.pruneexpire=now
> on both of the remote repositories and all of their clients (where
> should the values be set? On the remote or on the clients?).
>
> The gc.auto setting has been there for a while with no seeming effect,
> and adding the gc.pruneexpire setting seemed to work on a single push.
>
> (I have the possibility to add a hook on the remote, to compress on every
> push, or alternatively compress using a cron job, but I thought it would
> be more correct if I could convince git to do this on its own)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [git-users] Re: How to make pack remote repository on every push?

2015-11-20 Thread Gergely Polonkai
Hello,

You may want to play with gc.pruneexpire. From man git-config:

   gc.pruneexpire
>When git gc is run, it will call prune --expire 2.weeks.ago.
>Override the grace period with this config variable. The value
>"now" may be used to disable this grace period and always prune
>unreachable objects immediately.


Best,
Gergely

2015-11-19 18:41 GMT+01:00 Steinar Bang :

> > Igor Deyashkin <
> igor.deyashkin-re5jqeeqqe8avxtiumw...@public.gmane.org>:
>
> > What are you expect from git gc in your case?
>
> I didn't *expect* anyhing, but what I *hoped* for was a way for git to
> compress the repository as much as it could on each push.
>
> Ie. compress it as much as what I get when I cd into the bare repo on
> the remote and do a
>  git gc --agressive --prune=now
>
> (which saves quite a bit of space on my org file repos, everytime I've
> tried it)
>
> If I can't get this using git configuration, I can get what I want on
> the remote by creating a cronjob that packs it every night.  But that
> seems like a hack.
>
> Also it won't pack the repos of my work directories.
>
> > Seems like your remote repository havent any garbage commits. Am i not
> > right?
>
> I wasn't so much after the garbage collection, as the repacking.
>
> Thanks!
>
>
> - Steinar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [git-users] Re: How do I push a single tag?

2015-09-08 Thread Oliver Davies
No problem. :)

On Monday, 7 September 2015 04:04:27 UTC+1, Michael Gersten wrote:
>
>
> On 2015-09-06, at 6:20 PM, Oliver Davies  > wrote: 
>
> > Try "git push origin ReleaseAlpha2". You normally have to include the 
> name of the remote repository as well as the branch, tag, commit hash etc. 
>
> Thank you. 
>
>

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


Re: [git-users] Re: How do I push a single tag?

2015-09-06 Thread Michael

On 2015-09-06, at 6:20 PM, Oliver Davies  wrote:

> Try "git push origin ReleaseAlpha2". You normally have to include the name of 
> the remote repository as well as the branch, tag, commit hash etc.

Thank you.

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


Re: [git-users] Re: How report an error in the Spanish traduction?

2015-07-19 Thread Philip Oakley
Hi Renán,

Junio, the primary Git maintainer, has noted that currently Spanish is not one 
of the translations managed through his Internationalisation [for codes, see 
1], as coordinated by Jiang Xin.

What distribution of Git are you using (i.e. where is it provided from, what's 
it's licence/copyright)? 

Initially the translation mistake should be reported to that upstream. 

I believe the Git team would still welcome the contribution of a Spanish 
transalation [2] if you or the upstream would like to contribute. The current 
transalation teams are at [3].

regards

Philip

[1] https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes 
[2] Code Indo-European :: Spanish :: español :: es (from 1)
[3] https://github.com/git-l10n/git-po/blob/master/po/TEAMS
  - Original Message - 
  From: Philip Oakley 
  To: git-users@googlegroups.com 
  Cc: Git List 
  Sent: Saturday, July 18, 2015 12:32 AM
  Subject: Re: [git-users] Re: How report an error in the Spanish traduction?


  copying the main Git List g...@vger.kernel.org message regarding 
Internationalisation (I10n). 
  The mail list public record is at 
http://news.gmane.org/gmane.comp.version-control.git.

  See the last paragraph:

  14 July 2015 00:54

  [L10N] Kickoff of translation for Git 2.5.0 round 2

  Hi,

  Thanks to all the l10n teams, and the 1st round of translations for Git 2.5.0
  has been merged.  While there are some new messages need to be
  translated for the new released Git v2.5.0-rc2, let's start new round of l10n.
  The l10n window has less than 2 weeks for us, see: http://tinyurl.com/gitcal .

  This time there are 9 updated messages need to be translated since last
  update:

  l10n: git.pot: v2.5.0 round 2 (9 new, 5 removed)

  Generate po/git.pot from v2.5.0-rc2 for git v2.5.0 l10n round 2.

  Signed-off-by: Jiang Xin worldhello@gmail.com

  You can get it from the usual place:

  https://github.com/git-l10n/git-po/

  As how to update your XX.po and help to translate Git, please see
  Updating a XX.po file and other sections in “po/README file.

  --
  Jiang Xin
  --

- Original Message - 
From: Renán Romero Ruiz 
To: git-users@googlegroups.com 
Sent: Friday, July 17, 2015 10:03 PM
Subject: [git-users] Re: How report an error in the Spanish traduction?


Hello,  


Maybe can you find this on a .po file in the source code of git 
https://github.com/git/git


But is strange that I not found it


Regards!

On Friday, July 17, 2015 at 7:32:26 AM UTC-5, Eric Romanenghi wrote: 
  Hi! There is a an error in the spanish traduction of Git. 

  When i wrote git status this morning, i saw this:

  (use «git checkout -- archivo...« para descartar cambios en le 
directorio de trabajo)

   Note the error le directorio is el directorio.

  How can i report or fix this error?

  Thanks!


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


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

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


Re: [git-users] Re: How to move manually-versionned files to git (version control)?

2014-11-26 Thread John McKown
On Wed, Nov 26, 2014 at 8:35 AM, Konstantinos Mavroudakis 
kmavrouda...@gmail.com wrote:

 Thank you !

 I suppose that there is no formal way to import all of these in git. Is
 n't it? I expected that there would be such documented procedure or
 command(!) in git (or other version control systems) to help newcomers to
 import their old changes (commits)...


​From what other source control? git has a fast-import command in the basic
command set. But it isn't normally used by an individual. I should warn you
that I am not anywhere close to being a git expert. Hopefully one of the
wise old ones will come along side with some really helpful advice​



 Best regards,

 Konstantinos



-- 
The temperature of the aqueous content of an unremittingly ogled
culinary vessel will not achieve 100 degrees on the Celsius scale.

Maranatha! 
John McKown

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


Re: [git-users] Re: How to move manually-versionned files to git (version control)?

2014-11-26 Thread Konstantinos Mavroudakis
From zero source control :)  i.e. no source control

On Wednesday, November 26, 2014 4:48:02 PM UTC+2, John McKown wrote:

 On Wed, Nov 26, 2014 at 8:35 AM, Konstantinos Mavroudakis 
 kmavro...@gmail.com javascript: wrote:

 Thank you ! 

 I suppose that there is no formal way to import all of these in git. Is 
 n't it? I expected that there would be such documented procedure or 
 command(!) in git (or other version control systems) to help newcomers to 
 import their old changes (commits)...


 ​From what other source control? git has a fast-import command in the 
 basic command set. But it isn't normally used by an individual. I should 
 warn you that I am not anywhere close to being a git expert. Hopefully one 
 of the wise old ones will come along side with some really helpful advice​
  


 Best regards,

 Konstantinos



 -- 
 The temperature of the aqueous content of an unremittingly ogled
 culinary vessel will not achieve 100 degrees on the Celsius scale.

 Maranatha! 
 John McKown
  

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


Re: [git-users] Re: How to move manually-versionned files to git (version control)?

2014-11-26 Thread John McKown
On Wed, Nov 26, 2014 at 8:52 AM, Konstantinos Mavroudakis 
kmavrouda...@gmail.com wrote:

 From zero source control :)  i.e. no source control


​My bad. When you said import their comments, I just ASSuMEd that those
comments already existed in another source control system.​ Going back to
your original post where you basically encoded the date into the file name
as a type of commit point, I guess that the git people didn't look at
some sort of import simply because there is no real standard about such.
I guess that they felt that anyone who was using a personal ad hoc system
that they designed themselves would just need to convert to git as best as
they could.




 On Wednesday, November 26, 2014 4:48:02 PM UTC+2, John McKown wrote:

 On Wed, Nov 26, 2014 at 8:35 AM, Konstantinos Mavroudakis 
 kmavro...@gmail.com wrote:

 Thank you !

 I suppose that there is no formal way to import all of these in git. Is
 n't it? I expected that there would be such documented procedure or
 command(!) in git (or other version control systems) to help newcomers to
 import their old changes (commits)...


 ​From what other source control? git has a fast-import command in the
 basic command set. But it isn't normally used by an individual. I should
 warn you that I am not anywhere close to being a git expert. Hopefully one
 of the wise old ones will come along side with some really helpful advice​



 Best regards,

 Konstantinos



 --
 The temperature of the aqueous content of an unremittingly ogled
 culinary vessel will not achieve 100 degrees on the Celsius scale.

 Maranatha! 
 John McKown

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




-- 
The temperature of the aqueous content of an unremittingly ogled
culinary vessel will not achieve 100 degrees on the Celsius scale.

Maranatha! 
John McKown

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


Re: [git-users] Re: How to recover from a Detached Head

2014-11-03 Thread Konstantin Khomoutov
On Sun, 2 Nov 2014 18:26:15 -0800 (PST)
Anthony Berglas aberg...@gmail.com wrote:

 Thank you for all your very considered replies.  The solution I end
 ed up using (without the complex explanations) was
 
 git push
 # fail
 git pull
 git merge origin/master

This step is not needed: `git pull`, when you're on master which is
set to track origin/master (we imply this is the case here) will
fetch all the new stuff from master at origin and then merge
it into master.

I would reiterate that `git pull` has too much magic built in so I would
use

  git fetch origin
  git merge origin/master

instead until you do really understand what these two commands do and
how `git pull` combines them.

 # resolve conflicts
 git push
 
 This should go up the front of any manual of GIT, right after git
 clone. But I have not seen it explicitly that I can recall.  (I threw
 the abtmp branch away)
 
 My interpretation is that that when you push to a remote it will will 
 follow any direct set of arrows (only) to move origin/master along.

Correct, unless you use --force with `git push` *and* the remote
repository allows such forced pushes--they are disallowed by default
for obvious reasons (if these are not obvious feel free to ask).

 I have not read that anywhere though.
 
 rant
 
 One problem with GIT is that every document author gets so carried
 away with advanced features for obscure branching and even partial
 staged commits(!) that they just lose track of the basics.

 For example the Git Basics chapter in the git-scm.com book talks about
 advanced things like staging in the intro (which I would never use,
 just always commit -a) but does not describe how to check in to a
 shared repository and resolve conflicts.  Then the external
 repository chapter does not talk about merging!
 
 The simple model, which I use, is that there is one shared repository
 used by all developers.  I have a local cache, much like Subversion
 but storing all the history for convenience.  We all normally work on
 head, with branches for releases that are kept very short.  Big
 merges are dangerous and avoided.
 
 I have seen teams get into big trouble just introducing branches to
 CVS. As code is merged backwards and forwards between the branches
 errors are introduced.  Buggy code often reappears on different
 branches, only to be merged back onto good branches.  But the good
 news is that once you fix the same bug multiple times you get really
 good at fixing that bug.  Of course because of all this merging the
 code could never be restructured which would make the merges
 unmanageable.
 
 Note that the above is not because of CVS's many, many issues.  It is 
 instead the nature of branching and merging code.  And in particular
 to rely on complex branching rather than having a good module
 structure that makes branching largely unnecessary.
 
 The idea that people are only staging some file in their working
 directory at particular times during the edit, and then putting
 different staged changes into different branches, and then pushing
 different branches to different shared repositories seems just crazy
 to me.  Broken builds would be the least of the problems.  Maybe a
 team of people as smart as Linus Torvald might be able to handle it,
 but not the people that I have worked with.
 
 So it is great to have fancy functionality.  But getting the basics
 right is most important.  Using git like Subversion doc should be
 chapter 1, not just left as a something implied.  
 
 /rant

The problem is that basics is a different thing depending on where
you stand for.

For instance, you take for granted that everyone would use
`git commit -a` for a start and then may be try using advanced stuff.
But as one example, here at my $dayjob a bunch of webdevs hired about
2-3 month ago used those partial staged commits all the time even before
they did their first `git merge` (actually, they used `git add --patch`
which provides for even more fine-grained staging).  Why?  Because we
here value clean history and atomic commits and so we focussed on that
first.

You seem to assume that the approach Subversion takes is a de-facto
standard and hence every other tool out there must strive to make
Subversion users feel at home.  While Subversion does indeed have a
great market share and is well entrenched in the shops not completely
sold on Microsoft-supplied stuff, and there's nothing really wrong with
the approaches to SCM it implements, Git is just different.  I know
this sounds weak, but no, you can't really make it work like Subversion
because it has been created with different mindset and different goals.

It's like procedural programming languages vs functional: you can write
programs in both, and (typically) you can to a certain extent mimic
approaches from a foreign domain in a code written in native but it
will look and feel clumsy at best.

The same goes to Git vs Subversion: the key to getting Git paradigms
right when you come from Subversion is 

Re: [git-users] Re: How to recover from a Detached Head

2014-10-31 Thread Nelson Efrain A. Cruz
you can take a look at

http://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#Pulling

Or

http://git-scm.com/docs/git-pull

2014-10-31 4:18 GMT-03:00 Gergely Polonkai gerg...@polonkai.eu:

 Hello,

 let me fix this up a bit:

 On 31 Oct 2014 04:39, Rick Umali rickum...@gmail.com wrote:
 
  On Thursday, October 30, 2014 2:41:42 AM UTC-4, Anthony Berglas wrote:
 
  I am trying to do something really simple.  I want to commit local
 changes to a remote repository.  But along the way other developers
 modified the remote.  This appears to be very difficult to do in Git.
 
 
  You can modify the remote by using git push. It's not too difficult, but
 it can be confusing!
 

 I wouldn't do that, as it usually does more harm then good.

 
  When I finished my changes I did a commit -a.  All good.
 
  But then the push failed.  git fetch ok.  So I tried to checkout the
 origin/master.  That gave me a detached head, even though it looked like
 I was on head.  It said create a branch so I created abtmp (I do not
 actually want any branches).  Then merged origin/master back into abtmp
 (which seems the wrong way).
 
 
  Believe it or not, I think you're partially there!
 
  One key: the origin/master represents the master on the remote
 repository. You cannot use git checkout origin/master, because
 origin/master is a remote-tracking branch. These exist as book marks the
 where master is on the remote.
 
  So now I have the following.  What I want is to get rid of abtmp and
 commit back to origin/master on the remote server.
 
  $ git log --oneline --decorate --graph --all
  *   5e0fcfb (HEAD, abtmp) Merge remote branch 'origin/master' into abtmp
  |\
  | * 944773a (origin/master, origin/HEAD) - shrm has to be optional
 logically (if s
  | * 4952f9c - correct to point by default
  * | 75b9d6d (master)  Performace tests
  |/
  * c1106db - replace with st
  * b046367 - set back further
  * 5a3ce83 - fixup doc link reference
  * 2ca8ecf (tag: 7.0e) - this
 
 
  I'm really glad you posted this git log output. It really helps us
 understand the state of your repository.
 
  I read your history like this:
 
  Your last work was on 75b9d6d, aka master. When you did the git push, it
 complained because your master wasn't in sync with the remote. You
 performed a git fetch, which brought in the commits that were on the
 remote. Doing git log shows you that the remote's master was 944773a, aka
 origin/master. Per the 'detached HEAD' message, you learned you needed a
 branch to work on origin/master. You created the branch abtmp. You then
 merged abtmp into origin/master, but from the git log output, I believe
 that abtmp was created while you were on your local master. Do you remember
 how you created the abtmp branch?
 
  I say all this because 5e0fcfb, the abtmp branch, seems to have 944773a
 (origin/master) and 75b9d6d (master) as its parents.
 
  To help further, give us the output of these commands:
 
  git branch
  git log --abbrev-commit --parents -n 1
 
  This should give abtmp as the current branch, and it should say 944773a
 and 75b9d6d in the commit line.
 
 
  Questions:-
  How do I fix this up.
 
   I believe given the graph output that all you need to do is:
 
  git checkout master
  git merge abtmp
 
  This will send master to the same commit as abtmp (because it should be
 a fast-forward merge), and you can then type:
 
  git branch -D abtmp

 You should use -d instead. It also removes the branch, but first checks if
 it has been merged or not. This can come in handy if your eye slips over an
 erroro message about a failing merge (which is hard, but happens sometimes).

 
  This will delete the abtmp branch.
 
  What is the best way to deal with these simple conflicts in future.
 
  You're doing it already: git fetch, and then carefully merging
 origin/master back into your branch. If your concerned or paranoid, you can
 clone your repository to a separate directory, and try out the steps in
 your clone.

 Another way is to rebase. This can be done either by git pull --rebase, or
 with git fetch origin; git rebase origin/master.

 
  Is there any doc that goes over this clearly. (e.g. not
 http://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes which goes
 over setting up multiple remotes etc. and other cleverness but not the
 basics.)
 
 
  I'm writing a book that is going over the basics. There are other
 resources out there, though. Search for git merge, git branch, and
 remote-tracking branches.

 The Git book on git-scm.org is a good source for any Git users.  It's a
 bit long, but covers almost(?) every aspect of Git.

 
  Good luck!
  --
  Rick Umali / Author: Learn Git in a Month of Lunches /
 www.manning.com/umali
 
  --
  You received this message because you are subscribed to the Google
 Groups Git for human beings group.
  To unsubscribe from this group and stop receiving emails from it, send
 an email to git-users+unsubscr...@googlegroups.com.
  For more options, visit 

Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-21 Thread Bob Hiestand
It seems strange to use git (or other VCS) to store build products.

To your question, the simplest approach would be something like this:

git checkout dst
rm -rf *
git checkout src .
run build process
git commit

You can get a little more fancy if you want to reference the src branch as
a parent, by replacing the commit with something like the following:

TREE=$(git write-tree)  COMMIT=$(git commit-tree $TREE -p dst -p src -m
commit message)  git update-ref HEAD $COMMIT  git update-index
--refresh

You could use other plumbing commands to manipulate the state of the index
and working tree as well.

git checkout dst
git read-tree -m -u src
run build and commit

... seems to do what you want in one step, but if you just do the read-tree
and have changes, it will merge them.

git checkout dst
git read-tree src
git clean -f
git checkout .
run build and commit

may be the cleanest (no pun intended) variant of doing what you request.

Bob


On Tue, May 20, 2014 at 10:22 PM, Sam Roberts vieuxt...@gmail.com wrote:

 On Tue, May 20, 2014 at 7:00 PM, Pierre-François CLEMENT
 lik...@gmail.com wrote:
  Okay then, in that case what you need is the --squash option of
 git-merge.
 
  --squash, --no-squash

 Interesting idea, but I don't think it will work, since I don't want
 any of  the build products from the last commit
 on the deploy branch.

 Imagine master starts with a.c and b.c, then a.c is removed, and d.c is
 added:

 master: A (a.c, b.c) - B(b.c, d.c)

 What I want is for a deploy to look like:

 deploy: A1 (a.c,b.c) - A2 (a.c, b.c, a.o, b.o) - B1 (b.c,d.c) -
 B2(b.c, d.c, b.o, d.o)

 or preferably just:

 deploy: A* (a.c, b.c, a.o, b.o) - B*(b.c, d.c, b.o, d.o)

 (above is easy, its just a squash of the pre-built source with the
 post-built source).

 If I squash merged B into A*, I think the files ADDed into the deploy
 branch A* would not get removed, I'd have:

 bad-deploy: A2 - B*(b.c, d.c, a.o, b.o)

 Where a.o is build file for a source file that doesn't exit anymore.

 I don't want anything from the previous commit, and everything from the
 next.

 I think I'll read carefully through this:

 http://git-scm.com/book/en/Git-Internals-Git-Objects


 it looks like I made be able to read/write commits constructed as I wish.

 Sam

 Btw, thanks for the suggestions, I appreciate it.

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


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


Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-21 Thread Sam Roberts
On Wed, May 21, 2014 at 9:08 AM, Bob Hiestand bob.hiest...@gmail.com wrote:
 It seems strange to use git (or other VCS) to store build products.

Seems so, but Heroku, openshift, etc., all accept or require runnable
apps to be git pushed. I don't want build products in the dev src
tree, of course, only the branch to be pushed. And thus the finagling
to get a deploy branch that mirrors the src, but with build products.

 You can get a little more fancy if you want to reference the src branch as a
 parent, by replacing the commit with something like the following:

 TREE=$(git write-tree)  COMMIT=$(git commit-tree $TREE -p dst -p src -m
 commit message)  git update-ref HEAD $COMMIT  git update-index
 --refresh

Thanks, I've been reading through the plumbing, playing around to see
how to construct what I want, I'll try something like the above.

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


Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-21 Thread Sam Roberts
On Wed, May 21, 2014 at 9:08 AM,  wbo...@metzler.com wrote:
 Perhaps the following command sequence works for you

This looks like a good start, too, thanks everybody.

Sam

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


Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-20 Thread Sam Roberts
On Tue, May 20, 2014 at 6:18 PM, Pierre-François CLEMENT
lik...@gmail.com wrote:
 Do you *need* a new commit on top of the DST branch?

Yes, I can't just reset it, because the will blow away the history,
I'll lose the old commits that I built and committed, so won't be able
to roll back the application.


 Le mercredi 21 mai 2014 02:21:42 UTC+2, Sam Roberts a écrit :

 I suspect there is an easy way to do this, because every git commit is
 an object that references a tree object that contains a complete
 source tree. I just want to take the tree that is at the head of
 branch SRC, and make a new commit at the head of branch DST that refs
 the same tree... but I don't know how to do this.

 I'm look for a clever way of doing something like the below, that
 won't have to make me worry about git cleaning, and extra files
 leaking in, etc.:

 git co src
 git archive -o /tmp/src.tar HEAD
 git co dst
 git rm .
 tar -xf /tmp/src.tar
 git add .
 git ci

 Basically, I have a src branch that won't contain any build products,
 but I also need to git push
 a branch that does have build products to a PaaS. So, I'll be
 continuously overwriting the head of a deploy branch with the state of
 the development branch, then rebuilding the minmized js, etc, so it
 can be pushed to a PaaS.

 Thoughts?

 Thanks,
 Sam

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

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


Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-20 Thread Sam Roberts
On Tue, May 20, 2014 at 7:00 PM, Pierre-François CLEMENT
lik...@gmail.com wrote:
 Okay then, in that case what you need is the --squash option of git-merge.

 --squash, --no-squash

Interesting idea, but I don't think it will work, since I don't want
any of  the build products from the last commit
on the deploy branch.

Imagine master starts with a.c and b.c, then a.c is removed, and d.c is added:

master: A (a.c, b.c) - B(b.c, d.c)

What I want is for a deploy to look like:

deploy: A1 (a.c,b.c) - A2 (a.c, b.c, a.o, b.o) - B1 (b.c,d.c) -
B2(b.c, d.c, b.o, d.o)

or preferably just:

deploy: A* (a.c, b.c, a.o, b.o) - B*(b.c, d.c, b.o, d.o)

(above is easy, its just a squash of the pre-built source with the
post-built source).

If I squash merged B into A*, I think the files ADDed into the deploy
branch A* would not get removed, I'd have:

bad-deploy: A2 - B*(b.c, d.c, a.o, b.o)

Where a.o is build file for a source file that doesn't exit anymore.

I don't want anything from the previous commit, and everything from the next.

I think I'll read carefully through this:

http://git-scm.com/book/en/Git-Internals-Git-Objects


it looks like I made be able to read/write commits constructed as I wish.

Sam

Btw, thanks for the suggestions, I appreciate it.

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


Re: [git-users] Re: How to commit chnages made on a read only repository code onto another repository I have write permission?

2014-02-19 Thread Nelson Efrain A. Cruz
Maybe you need to fork the read only repository, i mean clone te read only
repo and make the changes you need in this repo, then you can use the
forked repo as a submodule in your main repository.  In this way you will
be able to track your changes in the forked repo.

Anyway I don't know if is the best strategy.



2014-02-19 15:09 GMT-03:00 Tony M tonyson...@gmail.com:

 The clone failure was something to do with the machine I have been using.
 I tried the git submodule add *g...@github.com:A/readOnly.git* from
 anather machine and it works!

 But as I suspected, I cant push files. How can I track the changes in my
 repositories?
 Thanks,
 Tony

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




-- 
Nelson Efrain A. Cruz - https://plus.google.com/106845325502523605960/about

Debes ser el cambio que esperas ver en el mundo -Mahatma Gandhi

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


Re: [git-users] Re: How tell git-bush which new private key to use

2013-09-16 Thread Konstantin Khomoutov
On Mon, 16 Sep 2013 07:20:47 -0700 (PDT)
berd bersc...@googlemail.com wrote:

[...]
 I make this, convertet the key to OpenSSH key and move to %HOME%\.ssh 
 folder and choos the name vorm mykey_130903 to id_rsa
 
 And I call GIT bash in folder who is my reopsitory and enter:

  git pull
 
 From git.repository.my
 
b160ca3..a306100  master - origin/master

Yes, this means your local Git downloaded all the objects required to
update your origin/master branch from commit b160ca3 (it pointed to)
to commit a306100, and now it points to that commit.

 There is no tracking information for the current branch.
[...]
  * branchmaster - FETCH_HEAD

 I think it works :-)
 
 Or what do you mean?

Yes, fetching definitely works now.
As to how to go about `git pull` refusing to merge, it's completely
unrelated story -- just digest what Git printed to you and act
how you think would be best for you.

You could consider reading my posts where I tried to expain in detail
how `git pull` works internally -- [1] (simpler) and [2] (more
hard-core).  Also consider starting from reading [3] or may be even
right from The Book: [4], [5] (reading the whole book is recommended).

 Thanks for your help and sorry my english.

No problem!  It's purposedly mangled English (like the so-called
leetspeak, for example) which puts people off, not honest attempts at
writing correctly.

1. https://groups.google.com/d/msg/git-users/4CBW6DY0pDA/bs97usaQ-6MJ
2. http://stackoverflow.com/a/18787744/720999
3. http://longair.net/blog/2009/04/16/git-fetch-and-merge/
4. http://git-scm.com/book/en/Git-Basics-Working-with-Remotes
5. http://git-scm.com/book/en/Git-Branching-Remote-Branches

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


Re: [git-users] Re: how merge a branch in an empty head

2013-07-24 Thread Konstantin Khomoutov
On Wed, 24 Jul 2013 03:08:07 -0700 (PDT)
杨沐 azur...@gmail.com wrote:

 I do the same thing which u told me , but it doesn't work , please
 see the picture below:
 
 https://lh5.googleusercontent.com/-e-d0oW69PLE/Ue-ngBABkhI/ACo/zKRuTvaU7oA/s1600/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7+2013-07-24+%E4%B8%8B%E5%8D%886.07.28.png

Hi! Could you please just copy and paste plain text? This is way easier
to read and it's possible to quote and comment parts of it.
This document [1] details how to do that.

1. 
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_dos_copy.mspx

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




Re: [git-users] Re: how to ?

2013-07-22 Thread Konstantin Khomoutov
On Fri, 19 Jul 2013 23:31:04 -0700 (PDT)
Syaifull Al-Bandary ritnes...@gmail.com wrote:

 thank you, your answer. I would probably ask for a lot of time to
 come.
 
 we need your clarification on git, to make us understand. please,
 continue the explanation.

[...]

I'm not sure what do you mean -- I tried to explain that your question
as it was asked had little sense as it was too broad, and tried to
explain why.  Now please understand that Internet is abundant with the
HOWTOs, blog posts etc dealing with deploying server-side Git catered
for specific scenarios.  So please don't ask me to do the necessary
research for you -- do it yourself.

Possibly you should start from familarizing yourself with Git by
starting with documents and books mentioned at [1].

Also don't forget that there are commercial turn-key Git hosting
providers which will enable your team to host private repositories with
zero effort on your part -- Github, Bitbucket, Assembla, to name
a few.  I suspect you do not currently possess the necessary skills to
undertake the task of professionally hosting server-side Git yourself
so I'd look at commercial solutions.

1. http://git-scm.com/documentation

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




Re: [git-users] Re: How to deal with concurrent changes in a project

2013-07-04 Thread Philip Oakley
It is easy to use Git 'the wrong way' when transferring over from other styles 
of version control. 

Most old styles of version control (including what most people think in their 
head) have a master-slave copy viewpoint. This assumes that there is a single 
'master' (both the respository and its items), and every now and again one is 
allowed to edit some small well defined item from the repository. It has been 
that was since RMS Titanic was drawn on kaolin and linen drawing sheets. Often 
it was only allowed to record the 'notice of change' (changeset) as the master 
was too precious to be let out for any old minor correction. The changeset 
implementation still exists in some tools.

That mind set is now outdated when it comes to computer files. Computer files 
can be perfectly duplicated at essentially zero cost and protected (be 
verified) by secure hash codes. The old problems that version control 'solved' 
are not the problem any more, but the mind set still lingers.

Git was designed from the bottom up to be fully distributed using the secure 
hash codes for content verification. There is no Master (there can be many 
master copies)

So far so good. The other problem with the old system was the 'everything in 
one big storage repo' philosophy (remember about the need to protect the 
'master', so keep them all in the one safe zone). With Git, because hash code 
verification is so strong one is now encouraged to keep each project in a 
separate repo.

Git also allows, even favours, having many branches for the separate lines of 
development (aka feature branches), which can be then merged back into the 
master branch when each is ready. It sounds as if you may need to use these two 
latter features so that independant project are placed in separate repos, and 
then you can also run separate branches as required. You would push and pull 
the relevant branches from your development machines (with working trees) to 
your server (bare) as required.

Philip


  - Original Message - 
  From: jayka...@gmail.com 
  To: git-users@googlegroups.com 
  Sent: Wednesday, July 03, 2013 2:05 PM
  Subject: [git-users] Re: How to deal with concurrent changes in a project


  Just to be clear:

  - I am not using github
  - I have set up a git server on a local machine. It works fine.
  - I have a single repository on the server. 
  - There are currently 5 clients (mix of windows, linux and osx)

  Thanks for the suggestions but they do seem to be quite complex given that 
this surely must be a common situation. I'm much more used to subversion where 
it's completely under the control of the user which files are checked in to the 
repository. 

  Am I doing the wrong thing by having a single working directory on the 
client? I did it that way because I have a lot of projects that are dependent 
on a common set of libraries. So I'm treating the entire database as a single 
mega project.

  I just feel I'm using git in the wrong way. All the tutorials I can find 
concentrate on simple examples so it's difficult to know.


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

  No virus found in this message.
  Checked by AVG - www.avg.com
  Version: 2013.0.3345 / Virus Database: 3204/6458 - Release Date: 07/02/13

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




Re: [git-users] Re: how to connect the two local machine in order use git

2013-06-06 Thread Konstantin Khomoutov
On Thu, Jun 06, 2013 at 12:09:57AM -0700, Manjunath Hv wrote:

 Hi Philip,
   
  Please find the details below 
 
 Machines : One is Windows 7  other is windows XP  
 Version : 1.8.1.msysgit.1
 I can see the file as well as directories on other system. Will u please 
 tell me how to check remote file permissions??
 The error message is from git.
 The same message is coming from Git Bash as well as Git GUI
 
 Path :git remote add origin username@machinename:~/git-manju
  git clone usename@machinename:~/git-manju

Please read the docs next time, do not just copy and paste random bits
found in the internets: the syntax user@server:repo implies using the
SSH protocol for communication which is not available in stock Windows.
It might be set up by installing any of available third-party packages
implementing SSH for Windows on the host which you want to designate to
be a server.

But a simpler way to set things up when it comes to Windows is to just
use Windows built-in file sharing mechanism (known as SMB or CIFS --
it's this procotol which enables you to see the file as well as
directories on other system).  To do this you have to use the file
protocol when constructing a Git URL for your remote repository, so you
should do something like this:

git remote add winxp file:windowsxp/sharename/path/to/git/repo

Here the file:// bit is the URL schema which tells Git which protocol
to use for accessing the repository, the //windowsxp/sharename is the
portable way to spell the Windows-ish \\windowxsp\sharename UNC path,
and the path/to/git/repo is the path to the actual Git repo you want
to access available via that share.

Before putting this to work you have to make sure that *transparent*
authentication works on that share for the contacting computer\user
combo, that is, when you boot the box which is to access your remote
repo, log in with the user which is to call `git push`, fire up Windows
Explorer and navigate the \\windowsxp\share share, Windows must let you
in without asking for credentials.  You also must be able to create and
modify files in the target directory on that share if you wish to push
changes there (i.e. to update the target repo).

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




Re: [git-users] Re: how to connect the two local machine in order use git

2013-06-06 Thread Quark
you may want to read this
http://stackoverflow.com/questions/377213/git-serve-i-would-like-it-that-simple





 From: Manjunath Hv manjumud...@gmail.com
To: git-users@googlegroups.com 
Sent: Thursday, 6 June 2013 3:54 PM
Subject: [git-users] Re: how to connect the two local machine in order use git
 



Hi ,

Will you please elaborate on this by taking example  also mentioning what  
which commands are to be run on client as well on server. Most of the time we 
are using GIT GUI. It would be grateful if you give explanation by considering 
client  server architecture


On Thursday, June 6, 2013 11:43:42 AM UTC+5:30, Manjunath Hv wrote:
Hi,

Please tell me how to connect the two local machines in order to use git. 
These two machine are connected to the local network. when i am try to push 
the file from one machine to another machine displaying by giving correct 
path with correct machine name message as Make sure that you have the 
correct access rights  correct repository exists

Thanks  Regards,
Manjunath HV

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




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




Re: [git-users] Re: How to organise the workflow

2013-05-02 Thread Dale R. Worley
 From: Philip Oakley philipoak...@iee.org
 
 Update
 Just found 
 http://git.661346.n2.nabble.com/gitk-pays-too-much-attention-to-file-timestamps-td4861833.html
 git update-index --refresh -q (may need a trailing '*') appears to be the 
 plumbing command
 (see third item *Jonathan 
 Nieder-2*http://git.661346.n2.nabble.com/template/NamlServlet.jtp?macro=user_nodesuser=142382
   Apr 07, 2010; 12:36am )

I don't know about gitk, but I just checked, and git status does
*not* last a file as changed if you touch it.

Dale

Dale Worley
--
Paul R. Joslin - Age 10
My young brother asked me what happens after we die. I told him we
get buried under a bunch of dirt and worms eat our bodies. I guess I
should have told him the truth - that most of us go to hell and burn
eternally, but I didn't want to upset him.
-- From a newspaper contest where entrants age 4 to 15 were asked to
   imitate Deep Thoughts by Jack Handey.

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




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

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

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

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

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

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

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

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

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

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

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




Re: [git-users] Re: How to convert SVN tags to Git

2013-01-24 Thread Konstantin Khomoutov
On Thu, Jan 24, 2013 at 01:37:54PM -0800, Luís de Sousa wrote:

 For future reference, the full account of how dealt with this issue can be 
 read my blog[1].
 
 Thank you all for the guidance to this solution,

Thanks for summarising and sharing.  That's a really good practice.

-- 




Re: [git-users] Re: How to convert SVN tags to Git

2013-01-22 Thread Konstantin Khomoutov
On Tue, 22 Jan 2013 05:44:17 -0800 (PST)
Luís de Sousa luis.a.de.so...@gmail.com wrote:

[...]
 Now the issue is that I have no master branch, but all the oldre
 branches cloned. Can I just rename the most recent branch and delete
 the older branches?

This is a rather philosophical question.  The special treatment of the
trunk in Subversion and a branch named master in Git are just
examples of (common) policies, not enforced by the corresponding tools.

Hence you pick what *you* think should be your master and either fork
master off that branch (and delete it afterwards) or rename that
branch to master.

-- 




Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-29 Thread Fred


On Wednesday, August 29, 2012 4:11:23 AM UTC+2, Michael Wang wrote:

 I have tried git diff master... which also have this issue, the 
 cherry-picked change is showing in the output.


You are right. that's because the way it works. it finds last commit in 
master where branchB was forked and than does diff. since cherry-pick was 
later,
it is not considered in diff. simple git diff master..branchB works in that 
case. I still wonder if there is a solution
 




 2012/8/28 Fred fredga...@gmail.com javascript:



 On Tuesday, August 28, 2012 3:26:15 PM UTC+2, Michael Wang wrote:

 try git rev-list, following is an exmaple:

 loveky@LOVEKY-PC ~/test/test (dev)
 $ git log --oneline master
 1874792 4
 8ed7a1e 3
 a224756 2
 34b4b11 1

 loveky@LOVEKY-PC ~/test/test (dev)
 $ git log --oneline dev
 fd0c922 5
 a224756 2
 34b4b11 1

 loveky@LOVEKY-PC ~/test/test (dev)
 $ git rev-list master..dev
 fd0c9223561e9d034a4401bb7cf82a**aeee19723b



 git rev-list ist great, but it doesn't work for cherry picked commits

 do a cherry-pick commit from branchB into master. git rev-list 
 master..branchB would show sha1 of the commit in branchB. 
 But the change itself is already in master (cherry-picked and has 
 diffrent sha1)
  


 2012/8/28 Fred fredga...@gmail.com



 On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:

 On 08/28/12 05:47, Tim Chase wrote: 
  On 08/28/12 03:13, Fred wrote: 
  is there a way to check if a branch doesn't introduce changes, 
  which are not in master. 
  
  I'm partial to 
  
git diff my_branch ^master 
  
  which would find all the changes on my_branch that aren't yet on 
  master.  This is an open syntax so you can request changes that are 
  on my_branch_a, but aren't on master or on my_branch_b with 
  
git diff my_branch_a ^my_branch_b ^master 

 Additionally, I find the diff version somewhat hard to read unless 
 the delta is small, but the same syntax works for log: 

   git log my_branch ^master ^my_branch_b 

 which can give you a higher level view of the changes. 



 Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync 
 with master
 I do commit in master, so the master is ahead of my_branch by one 
 commit. 

 git diff my_branch ^master  would show a diff for this last commit and 
 that is not what I want. In that case it is ok master differs from 
 my_branch.

 What I want to detect is following:
 my_branch is in sync with master. Then there are some or none commits 
 in master and one commit into my_branch. 
 I want identify the commit into my_branch, because the change is not in 
 master 

 Thanks for help!


 -tkc 


  -- 
 You received this message because you are subscribed to the Google 
 Groups Git for human beings group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/git-users/-/GgdqxnD0yF8Jhttps://groups.google.com/d/msg/git-users/-/GgdqxnD0yF8J
 .

 To post to this group, send email to git-...@googlegroups.com.
 To unsubscribe from this group, send email to git-users+...@**
 googlegroups.com.

 For more options, visit this group at http://groups.google.com/**
 group/git-users?hl=en http://groups.google.com/group/git-users?hl=en.




 -- 
 Michael Wang
 Unix/Linux Admin | Software Configuration Management
 MSN: ylz...@gmail.com
  Blog: http://loveky2012.**blogspot.comhttp://loveky2012.blogspot.com/ 
 命由己作,福由心生;积善之家,必有余庆;

   -- 
 You received this message because you are subscribed to the Google Groups 
 Git for human beings group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/git-users/-/D8HhGyrU0sgJ.

 To post to this group, send email to git-...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 git-users+...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/git-users?hl=en.




 -- 
 Michael Wang
 Unix/Linux Admin | Software Configuration Management
 MSN: ylz...@gmail.com javascript:
 Blog: http://loveky2012.blogspot.com 
 命由己作,福由心生;积善之家,必有余庆;

 

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



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-29 Thread Fred


On Wednesday, August 29, 2012 2:21:54 PM UTC+2, Michael Haggerty wrote:

 On 08/28/2012 04:51 PM, Fred wrote: 
  git rev-list ist great, but it doesn't work for cherry picked commits 
  
  do a cherry-pick commit from branchB into master. git rev-list 
  master..branchB would show sha1 of the commit in branchB. 
  But the change itself is already in master (cherry-picked and has 
  diffrent sha1) 

 Git does not keep track of cherry-picked commits in *any* formal way 
 (unlike, for example Subversion) [1] and therefore does not have the 
 information required to answer the question that you are asking.  This 
 is why git workflows are usually organized to avoid the need for 
 cherry-picking, for example by always merging forward from old branches 
 to new instead of vice versa.  In exchange for this limitation, git 
 gives much more robust merging and better history visualization tools 
 than Subversion. 


I agree Git gives me more advantages. That's why I'm using it :)

No one gives a warning about issues with cherry picking or I have missed 
it. That said, now I have a problem
 


 Michael 

 [1] 

 http://softwareswirl.blogspot.de/2009/08/git-mercurial-and-bazaarsimplicity.html
  

 -- 
 Michael Haggerty 
 mha...@alum.mit.edu javascript: 
 http://softwareswirl.blogspot.com/ 


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



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Aneesh Bhasin
Hi..

On Tue, Aug 28, 2012 at 6:02 PM, Fred fredgarlo...@gmail.com wrote:


 On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:

 On 08/28/12 05:47, Tim Chase wrote:
  On 08/28/12 03:13, Fred wrote:
  is there a way to check if a branch doesn't introduce changes,
  which are not in master.
 
  I'm partial to
 
git diff my_branch ^master
 
  which would find all the changes on my_branch that aren't yet on
  master.  This is an open syntax so you can request changes that are
  on my_branch_a, but aren't on master or on my_branch_b with
 
git diff my_branch_a ^my_branch_b ^master

 Additionally, I find the diff version somewhat hard to read unless
 the delta is small, but the same syntax works for log:

   git log my_branch ^master ^my_branch_b

 which can give you a higher level view of the changes.



 Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync with
 master
 I do commit in master, so the master is ahead of my_branch by one commit.

 git diff my_branch ^master  would show a diff for this last commit and that
 is not what I want. In that case it is ok master differs from my_branch.

 What I want to detect is following:
 my_branch is in sync with master. Then there are some or none commits in
 master and one commit into my_branch.
 I want identify the commit into my_branch, because the change is not in
 master

 Thanks for help!

wouldn't 'git diff master...my_branch' (note three dots instead of
two) give what you want (or maybe its the other way round) ?

regards,
Aneesh

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



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Donovan Bray
git diff master..

Would give you what's in your current branch since master

git diff ..master

Would show you commits in master that your local branch doesn't have

git diff ...master

Or

git diff master...

Would show you all commits that your branch and master do not share

I only find the 3 dot version useful for identifying that two branches are 
entirely equal. 

On Aug 28, 2012, at 6:28 AM, Aneesh Bhasin contact.ane...@gmail.com wrote:

 Hi..
 
 On Tue, Aug 28, 2012 at 6:02 PM, Fred fredgarlo...@gmail.com wrote:
 
 
 On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:
 
 On 08/28/12 05:47, Tim Chase wrote:
 On 08/28/12 03:13, Fred wrote:
 is there a way to check if a branch doesn't introduce changes,
 which are not in master.
 
 I'm partial to
 
  git diff my_branch ^master
 
 which would find all the changes on my_branch that aren't yet on
 master.  This is an open syntax so you can request changes that are
 on my_branch_a, but aren't on master or on my_branch_b with
 
  git diff my_branch_a ^my_branch_b ^master
 
 Additionally, I find the diff version somewhat hard to read unless
 the delta is small, but the same syntax works for log:
 
  git log my_branch ^master ^my_branch_b
 
 which can give you a higher level view of the changes.
 
 
 
 Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync with
 master
 I do commit in master, so the master is ahead of my_branch by one commit.
 
 git diff my_branch ^master  would show a diff for this last commit and that
 is not what I want. In that case it is ok master differs from my_branch.
 
 What I want to detect is following:
 my_branch is in sync with master. Then there are some or none commits in
 master and one commit into my_branch.
 I want identify the commit into my_branch, because the change is not in
 master
 
 Thanks for help!
 
 wouldn't 'git diff master...my_branch' (note three dots instead of
 two) give what you want (or maybe its the other way round) ?
 
 regards,
 Aneesh
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Git for human beings group.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/git-users?hl=en.
 

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



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Fred


On Tuesday, August 28, 2012 5:13:39 PM UTC+2, donnoman wrote:

 git diff master.. 

 Would give you what's in your current branch since master 

 git diff ..master 

 Would show you commits in master that your local branch doesn't have 

 git diff ...master 

 Or 

 git diff master... 

 Would show you all commits that your branch and master do not share 

 I only find the 3 dot version useful for identifying that two branches are 
 entirely equal. 


Looks like git diff master... is what I'm looking for. Thanks!

 
 On Aug 28, 2012, at 6:28 AM, Aneesh Bhasin 
 contact...@gmail.comjavascript: 
 wrote: 

  Hi.. 
  
  On Tue, Aug 28, 2012 at 6:02 PM, Fred fredga...@gmail.com javascript: 
 wrote: 
  
  
  On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote: 
  
  On 08/28/12 05:47, Tim Chase wrote: 
  On 08/28/12 03:13, Fred wrote: 
  is there a way to check if a branch doesn't introduce changes, 
  which are not in master. 
  
  I'm partial to 
  
   git diff my_branch ^master 
  
  which would find all the changes on my_branch that aren't yet on 
  master.  This is an open syntax so you can request changes that are 
  on my_branch_a, but aren't on master or on my_branch_b with 
  
   git diff my_branch_a ^my_branch_b ^master 
  
  Additionally, I find the diff version somewhat hard to read unless 
  the delta is small, but the same syntax works for log: 
  
   git log my_branch ^master ^my_branch_b 
  
  which can give you a higher level view of the changes. 
  
  
  
  Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync 
 with 
  master 
  I do commit in master, so the master is ahead of my_branch by one 
 commit. 
  
  git diff my_branch ^master  would show a diff for this last commit and 
 that 
  is not what I want. In that case it is ok master differs from 
 my_branch. 
  
  What I want to detect is following: 
  my_branch is in sync with master. Then there are some or none commits 
 in 
  master and one commit into my_branch. 
  I want identify the commit into my_branch, because the change is not in 
  master 
  
  Thanks for help! 
  
  wouldn't 'git diff master...my_branch' (note three dots instead of 
  two) give what you want (or maybe its the other way round) ? 
  
  regards, 
  Aneesh 
  
  -- 
  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-...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
 git-users+...@googlegroups.com javascript:. 
  For more options, visit this group at 
 http://groups.google.com/group/git-users?hl=en. 
  


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



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Michael Wang
I have tried git diff master... which also have this issue, the
cherry-picked change is showing in the output.



2012/8/28 Fred fredgarlo...@gmail.com



 On Tuesday, August 28, 2012 3:26:15 PM UTC+2, Michael Wang wrote:

 try git rev-list, following is an exmaple:

 loveky@LOVEKY-PC ~/test/test (dev)
 $ git log --oneline master
 1874792 4
 8ed7a1e 3
 a224756 2
 34b4b11 1

 loveky@LOVEKY-PC ~/test/test (dev)
 $ git log --oneline dev
 fd0c922 5
 a224756 2
 34b4b11 1

 loveky@LOVEKY-PC ~/test/test (dev)
 $ git rev-list master..dev
 fd0c9223561e9d034a4401bb7cf82a**aeee19723b



 git rev-list ist great, but it doesn't work for cherry picked commits

 do a cherry-pick commit from branchB into master. git rev-list
 master..branchB would show sha1 of the commit in branchB.
 But the change itself is already in master (cherry-picked and has diffrent
 sha1)



 2012/8/28 Fred fredga...@gmail.com



 On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:

 On 08/28/12 05:47, Tim Chase wrote:
  On 08/28/12 03:13, Fred wrote:
  is there a way to check if a branch doesn't introduce changes,
  which are not in master.
 
  I'm partial to
 
git diff my_branch ^master
 
  which would find all the changes on my_branch that aren't yet on
  master.  This is an open syntax so you can request changes that are
  on my_branch_a, but aren't on master or on my_branch_b with
 
git diff my_branch_a ^my_branch_b ^master

 Additionally, I find the diff version somewhat hard to read unless
 the delta is small, but the same syntax works for log:

   git log my_branch ^master ^my_branch_b

 which can give you a higher level view of the changes.



 Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync
 with master
 I do commit in master, so the master is ahead of my_branch by one
 commit.

 git diff my_branch ^master  would show a diff for this last commit and
 that is not what I want. In that case it is ok master differs from
 my_branch.

 What I want to detect is following:
 my_branch is in sync with master. Then there are some or none commits in
 master and one commit into my_branch.
 I want identify the commit into my_branch, because the change is not in
 master

 Thanks for help!


 -tkc


  --
 You received this message because you are subscribed to the Google
 Groups Git for human beings group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/git-users/-/GgdqxnD0yF8Jhttps://groups.google.com/d/msg/git-users/-/GgdqxnD0yF8J
 .

 To post to this group, send email to git-...@googlegroups.com.
 To unsubscribe from this group, send email to git-users+...@**
 googlegroups.com.

 For more options, visit this group at http://groups.google.com/**
 group/git-users?hl=en http://groups.google.com/group/git-users?hl=en.




 --
 Michael Wang
 Unix/Linux Admin | Software Configuration Management
 MSN: ylz...@gmail.com
 Blog: http://loveky2012.**blogspot.com http://loveky2012.blogspot.com/
 命由己作,福由心生;积善之家,必有余庆;

   --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/git-users/-/D8HhGyrU0sgJ.

 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.




-- 
Michael Wang
Unix/Linux Admin | Software Configuration Management
MSN: ylzc...@gmail.com
Blog: http://loveky2012.blogspot.com
命由己作,福由心生;积善之家,必有余庆;

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



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

2012-07-23 Thread Rustom Mody
On Mon, Jul 23, 2012 at 11:54 AM, Thomas Ferris Nicolaisen tfn...@gmail.com
 wrote:


 Could you point me to that 'git-bash thing'? -- Looks very useful


 Note that it only works for zsh (z-shell) and bash, so you'll need to run
 either Linux, Mac, or Windows with Cygwin (or Git Bash).

 In the above shells, you have a variable called the PS1 which value
 appears in front of your command line prompt (typically username@machine,
 timestamp and stuff like that). There's a very popular script called
 git-prompt.sh that adds useful Git context to the PS1. It's available here:

 https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh


Thanks. Neat!

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



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

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

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

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

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

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

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



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

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

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

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

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



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

2012-06-15 Thread lei yang
On Fri, Jun 15, 2012 at 7:59 PM, Vincent van Ravesteijn v...@lyx.org wrote:
 Op 15-6-2012 13:46, lei yang schreef:

 Hi

 I mean,

 I have a commit like below
 commit 0e93b4b304ae052ba1bc73f6d34a68556fe93429
 Merge: b724cc1 51bfd29

 This commit done this work: merge b724cc1..51bfd29 commit,

 The question is how could I *onlys* through
 0e93b4b304ae052ba1bc73f6d34a68556fe93429 to get the formated patch for
 the
 commit(b724cc1..51bfd29)


 It is still not clear what you want to accomplish.

 Your proposal: git format-patch b724cc1..51bfd29 only gives you the
 commits that were in the branch 51bfd29 that weren't yet in the branch
 b724cc1. This just reflect the commits of one of the branches, but not the
 work done by the merge commit.



but,git format-patch b724cc1..51bfd29 do the same work as what you
said git format-patch 0e93b4b3^1..0e93b4b3^2
so this do the same thing, formated patch which merged, can you give a
try to explain it in your workspace. and I don't understand what you
said branch 51bfd29,51bfd29 is not the branch

Thanks for your help,git format-patch 0e93b4b3^1..0e93b4b3^2 is what I need.

Lei





 If this is really what you want you can do:

 $ git format-patch 0e93b4b3^1..0e93b4b3^2

 0e93b4b3^1 means the first parent of 0e93b4b3, which is b724cc1. 0e93b4b3^2
 means the second parent, which is 51bfd29

 HTH,

 Vincent

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



Re: [git-users] Re: How to merge two independent projects one commit by one commit?

2011-10-18 Thread Konstantin Khomoutov
On Tue, 18 Oct 2011 05:45:01 -0700 (PDT)
www xs...@yahoo.com wrote:

[...]
 However, most--i intend to say all-- git tutotials are half-baked,
 including some well-cited tutorials. It seems nobody has the patience
 to write it down and show other people and just let other people--like
 me-- to struggle and find their way out.
I beg to differ: you faced a quite unusual situation which is unlikely
to happen to other users--let alone those who spend their time writing
tutorials.  And tutorials are written for people having little to none
knowledge about the topic so they naturally tend to discuss ubiquitous
use cases, in simple terms, and possibly referring to as little Git
tools as possible.

You referred to Subversion here for some reason... do you care to
sketch how would you accomplish the same task with it (and don't forget
that subversion grew `svn patch` command only in version 1.7 which came
just a couple of days ago).  But OK, I think what would be really
useful in this case is you writing a blog post with detailed
description of your problem and the solution to it so that the next guy
could google it (or we could send it straight to your post).

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



Re: [git-users] Re: How to merge two independent projects one commit by one commit?

2011-10-18 Thread Konstantin Khomoutov
On Tue, 18 Oct 2011 07:17:39 -0700 (PDT)
www xs...@yahoo.com wrote:

 May I ask you one more question just for my learning purpose? If I ask
 my partner who works in a different company also use git, when he
 sends me the files he modified and together with .git/ directory. I
 can put all his files AND .git under partner/ directory. Then I can
 have his commits one by one. Is that correct?
Don't to that.  If there's absolutely no way for you to have network
connectivity betweeen your machines and there's no way for both of you
to access a central repo (on a specialized public Git hosting or VPS),
then consider using `git bundle` which was designed specifically for
this sort of things.

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



Re: [git-users] Re: How to migrate to git from two SVN repositories?

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

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

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

You should read up on grafts in git.

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


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

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

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

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


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


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


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

-- 
David

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



Re: [git-users] Re: How to move the master?

2010-08-13 Thread Rick DeNatale
On Thu, Aug 12, 2010 at 1:09 PM, jd chima...@gmail.com wrote:
 On Aug 12, 3:18 am, Konstantin Khomoutov khomou...@gmail.com wrote:

 That's because you created a situation known as detached HEAD.

  How can I fix this?  I want master to point to the same place as HEAD.

 Record the name of the commit HEAD points at, checkout master and
 hard reset it to that commit. The simplest way to do that is via a
 branch or tag:
 $ git tag foo
 $ git checkout master
 $ git reset --hard foo
 $ git tag -d foo

 Thank you for the help, that seems to have fixed the problem.

 One question: why is the git checkout master needed?  (What would
 have happened if I had done the hard reset when the detached head
 was checked out?)

Note that there is a HEAD for each branch, it points to the commit at
the tip of that branch.

The command git reset changes which commit HEAD points to for the
current branch.
-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

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



Re: [git-users] Re: How to move the master?

2010-08-13 Thread David Bruce
Hi,

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.

DSB

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



Re: [git-users] Re: How to move the master?

2010-08-13 Thread Rick DeNatale
On Fri, Aug 13, 2010 at 2:44 PM, David Bruce davidstuartbr...@gmail.com wrote:
 Hi,

 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 it's just a local repository (probably not) you can just rename the
branches, I'll use the branch name dev_branch to stand in for your
feature branch:

git branch -m master old_master
git branch -m dev_branch master

If the branches are remote you should be able to rename and end up
with tracking branches with something like this:

First rename the current master branch

git push origin master:refs/heads/old_master
   Create the branch old_master in the origin repository by
copying the current master branch.
git fetch origin
   Fetch updates from the remote repository
git branch --track old_master origin/old_master
   create a tracking branch
git checkout old_master
git push origin :refs/heads/master
Delete the remote master branch, remember that a branch is
just a pointer to a commit, and deleting it doesn't delete the commit
or any other commits
git branch -d master
Delete the local master branch

Now rename the dev_branch to be the new master branch:
git checkout dev_branch
git push origin master:refs/heads/dev_branch
git fetch origin
git branch -track master origin/master
git checkout master
git push origin :refs/heads/dev_branch
git branch -d dev_branch

The last two steps (which delete the remote and local dev_branch are optional)

There may be more efficient ways to do this. I use the grb ruby gem to
handle tasks like this and this is how it approaches renaming a remote
branch.


-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

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



Re: [git-users] Re: How do you exclude files from being merged by git pull, push etc?

2010-03-31 Thread Rick DeNatale
On Wed, Mar 31, 2010 at 12:11 PM, vfclists vfcli...@googlemail.com wrote:


 On Mar 31, 4:20 pm, Rick DeNatale rick.denat...@gmail.com wrote:
 Is this what you are looking for?

 http://www.gitready.com/beginner/2009/01/19/ignoring-files.html




 Using .gitignore is something I have considered, but it looks like it
 is going to get more interesting than that.
 I will probably have to use separate directories, and use some kind of
 condititional excludes or includes if .gitignore supports something
 like that.

 Does checking out a branch erase all the directories and files in the
 working directory and replace them with only the contents of the
 branch?

Only files which are tracked will be affected by a checkout.

Files don't get tracked until you git add them.

 .gitignore is a way to keep new files from being tracked.

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

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



Re: [git-users] Re: How to do a diff comparing a file in your workin directory against a branch or a particular commit?

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


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

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

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





 On Mar 17, 5:28 am, David Aguilar dav...@gmail.com wrote:
  On Tue, Mar 16, 2010 at 08:40:32AM -0400, Rick DeNatale wrote:
   On Tue, Mar 16, 2010 at 3:19 AM, vfclists vfcli...@googlemail.com wrote:
 
Is there a git command to compare a file in your working directory
against the same file in a branch or a particular commit?
 
   git diff example_branch -- path/to/file
 
   git diff cf3b3fd -- path/to/file
 
   --
   Rick DeNatale
 
  ...and if you use 'difftool' instead of 'diff'
  you'll see the diff in a graphical side-by-side
  viewer.
 
  Are you on Linux? (only asking because installing graphical
  diff tools is typically much easier on Linux than it is on Windows).
 
  Have fun,
 
  --
                  David
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Git for human beings group.
 To post to this group, send email to git-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/git-users?hl=en.
 

-- 
David

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