threads / discuss / 26788

The way to make work with git a bit more easier.

Subject: The way to make work with git a bit more easier.

## tl;dr

3 messages between Mar 19, 2011 and Mar 21, 2011.

replies: 2people: 3as markdown or json

Alexey Homyakov· Mar 19, 2011, 12:20 UTC · lore

Hi, guys, i'm enjoy to work with git, but think it's possibly to make one of the operation more easier. What do you mean about mark a parts of files which don't need to be tracked by git once instead using interactive adding each time? For example using statement in comments like this:

................ tracked part ............... //@git off ............... untracked part ............... //@git on ................ track again ................

It's easy to make git understand all possibly comments definitions.
Thanx.
-- 
С уважением,
Алексей.
Nguyen Thai Ngoc Duy· Mar 19, 2011, 12:30 UTC · re: Alexey Homyakov · lore

Re: The way to make work with git a bit more easier.

2011/3/19 Alexey Homyakov <alexey.homyakov@gmail.com>:
Show 17 quoted lines
> Hi, guys, i'm enjoy to work with git, but think it's possibly to make
> one of the operation more easier.
> What do you mean about mark a parts of files which don't need to be
> tracked by git once instead using interactive adding each time?
> For example using statement in comments like this:
>
> ................
> tracked part
> ...............
> //@git off
> ...............
> untracked part
> ...............
> //@git on
> ................
> track again
> ................

That's interesting, provided that this is only enabled by command argument (i.e. never activated by default). Another option is to make "git add -p" only show chunks that match a pattern.

-- 
Duy
Michael J Gruber· Mar 21, 2011, 12:33 UTC · re: Nguyen Thai Ngoc Duy · lore

Re: The way to make work with git a bit more easier.

Nguyen Thai Ngoc Duy venit, vidit, dixit 19.03.2011 13:30:
Show 22 quoted lines
> 2011/3/19 Alexey Homyakov <alexey.homyakov@gmail.com>:
>> Hi, guys, i'm enjoy to work with git, but think it's possibly to make
>> one of the operation more easier.
>> What do you mean about mark a parts of files which don't need to be
>> tracked by git once instead using interactive adding each time?
>> For example using statement in comments like this:
>>
>> ................
>> tracked part
>> ...............
>> //@git off
>> ...............
>> untracked part
>> ...............
>> //@git on
>> ................
>> track again
>> ................
> 
> That's interesting, provided that this is only enabled by command
> argument (i.e. never activated by default). Another option is to make
> "git add -p" only show chunks that match a pattern.

This can be done using a "clean" filter already. For example, for tracking my global git configuration, I use

[filter "dotgitk"]
        clean = fgrep -v geometry
and specify
.gitk   filter=dotgitk
for the attributes.

Cheers, Michael

← back to recent threads