Re: git: using branches



On Sat, Apr 18, 2009 at 4:43 PM, Johannes Schmid <jhs jsschmid de> wrote:
> Hi!
>
>
>> Il giorno sab, 18/04/2009 alle 16.08 +0100, Simos Xenitellis ha scritto:
>> >
>> > If there is an existing it.po in the repository, it is not required to
>> > 'git add'.
>>
>> Hmmm... my 'git help add' says I have to do it even if I modify one
>> file.
>>
>> If I try to 'git commit' without 'git add' before, it says:
>>
>> no changes added to commit (use "git add" and/or "git commit -a")
>>
>> and git will not do the real commit.
>>
>
> Yes, if you use git commit -a you can omit the add step and git will
> commit all changed files. Otherwise it will just commit the files you
> added to the commit (using git add).

There are at least three options/workflows,

A. Use 'git add' to specify the modified files to add when you commit,
so that you can use 'git commit' without having to specify the files at the end.

B. Just use 'git commit -a' so that any modified and already tracked
files are committed.
We do not need to 'git add' the modified files, just use when we have
to add a new file in the repository.

The issue here is if we modify some other existing file by accident,
which would get committed.

C. Just use 'git commit LL.po' so that we specify which file we want
to add and commit, in one line.
We do not need to 'git add' the modified files, just use when we have
to add a new file in the repository.

Since the translator's workflow is to add the initial translation file
once, and then commit modifications,
I think that [C] is a good workflow, and this is what is reflected at
http://live.gnome.org/TranslationProject/GitHowTo
Of course, any of these options are equally valid.

Simos


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]