[git-users] Re: excludesfile on Windows

2012-06-21 Thread Alexander Myltsev
Thanks! That's helped!

Regards, Alex

On Wednesday, June 13, 2012 11:34:33 AM UTC+4, Thomas Ferris Nicolaisen 
wrote:
>
> Hi Alexander,
>
> Aha, I see. No, keeping a certain set of files from being merged is not 
> possible in any straight forward way. It is usually a sign that your code 
> does not have quite the right structure for its task. Basically, code that 
> you don't want to be merged along with the rest of your changes should 
> somehow be kept outside the current Git repository.
>
> Let's say your project is called "funky", and you want to keep the code 
> excluded from merging in a separate repo called "funky-private":
>
> ├── funky
> │   └── stuff.txt
> └── funky-private
> └── TODO.txt
>
> Once you get your "private code" (that is, your TODO.txt) file into 
> "funky-private", you can pick some way of including it into the first one 
> during development, build, or run-time like this:
>
> ├── funky
> │   ├── private -> ../funky-private
> │   │   └── TODO.txt
> │   └── stuff.txt
> └── funky-private
> └── TODO.txt
>  
>
> Either use some way of linking in the 
> directory,
>  
> copy it in using some script, and then ignore this folder (here called *
> private*) in funky/.gitignore.
>
> Or use submodules as suggested in that thread on stackoverflow you 
> mentioned. It depends on your workflow, and what you persona preferences.
>

-- 
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/-/sABAmJpsPCYJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: excludesfile on Windows

2012-06-13 Thread Thomas Ferris Nicolaisen
Hi Alexander,

Aha, I see. No, keeping a certain set of files from being merged is not 
possible in any straight forward way. It is usually a sign that your code 
does not have quite the right structure for its task. Basically, code that 
you don't want to be merged along with the rest of your changes should 
somehow be kept outside the current Git repository.

Let's say your project is called "funky", and you want to keep the code 
excluded from merging in a separate repo called "funky-private":

├── funky
│   └── stuff.txt
└── funky-private
└── TODO.txt

Once you get your "private code" (that is, your TODO.txt) file into 
"funky-private", you can pick some way of including it into the first one 
during development, build, or run-time like this:

├── funky
│   ├── private -> ../funky-private
│   │   └── TODO.txt
│   └── stuff.txt
└── funky-private
└── TODO.txt
 

Either use some way of linking in the 
directory,
 
copy it in using some script, and then ignore this folder (here called *
private*) in funky/.gitignore.

Or use submodules as suggested in that thread on stackoverflow you 
mentioned. It depends on your workflow, and what you persona preferences.

-- 
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/-/7iv5R6AcfDkJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: excludesfile on Windows

2012-06-12 Thread Alexander Myltsev
Dear Thomas,

thanks for reply. I'm aware of .gitignore. Originally my task was to avoid 
some files to be merged from one branch to another. Git is working with 
commits. So excludesfile as well as .gitignore won't help to exclude some 
files. Lately I found 
http://stackoverflow.com/questions/8721984/git-ignore-files-for-public-repository-but-not-for-privatedescribing
 the same problem I have and a solution to it. Do you know any 
better way to solve this?

Nevertheless excludesfile doesn't work as I expect :(

Alex

On Sunday, June 10, 2012 5:44:20 PM UTC+4, Thomas Ferris Nicolaisen wrote:
>
> Hi,
>
> Just checking here, are you aware of the "normal" way of excluding files 
> with .gitignore files? I see you have one there in your working directory 
> but maybe you haven't made use of it yet. 
>
> The .git/info/excludes is more for the case where *you* want to ignore 
> something, but don't want to share this configurations with others cloning 
> the repository.
>
> The nice thing with .gitignore files is that they can be checked into 
> specific branches, thereby avoiding your problems.
>
> Try this:
>
> git checkout master
> echo TODO.txt >> .gitignore
> git add .gitignore
> git commit -m "Ignoring TODO text files"
>
> I don't believe they work differently on Windows 7, but if you still can't 
> get it working, I can fire up Windows here and figure it out.
>
> If you still want to do it using the excludes file, there's a writeup on 
> how to do it here:  
> http://cogniton-mind.tumblr.com/post/1423976659/howto-gitignore-for-different-branches
>
> And the official docs on:  http://git-scm.com/docs/gitignore 
>
> On Sunday, June 10, 2012 2:52:14 PM UTC+2, Alexander Myltsev wrote:
>>
>> Good day!
>>
>> I need excludesfile for a specific branch.
>>
>> $ git config --local branch.master.excludesfile
>> +info/exclude_public
>> $ ls .git/info/
>> exclude  exclude_public  refs
>> $ cat .git/info/exclude_public
>> TODO.txt
>> $ git status
>> # On branch master
>> # Untracked files:
>> #   (use "git add ..." to include in what will be committed)
>> #
>> #   .gitignore
>> *#   TODO.txt*
>> nothing added to commit but untracked files present (use "git add" to 
>> track)
>>
>> Does excludesfile work properly on Windows 7? What am I doing wrong?
>>
>> Regards,
>>   Alex
>>
>

-- 
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/-/kFTxtHf6BnMJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: excludesfile on Windows

2012-06-10 Thread Thomas Ferris Nicolaisen
Hi,

Just checking here, are you aware of the "normal" way of excluding files 
with .gitignore files? I see you have one there in your working directory 
but maybe you haven't made use of it yet. 

The .git/info/excludes is more for the case where *you* want to ignore 
something, but don't want to share this configurations with others cloning 
the repository.

The nice thing with .gitignore files is that they can be checked into 
specific branches, thereby avoiding your problems.

Try this:

git checkout master
echo TODO.txt >> .gitignore
git add .gitignore
git commit -m "Ignoring TODO text files"

I don't believe they work differently on Windows 7, but if you still can't 
get it working, I can fire up Windows here and figure it out.

If you still want to do it using the excludes file, there's a writeup on 
how to do it here:  
http://cogniton-mind.tumblr.com/post/1423976659/howto-gitignore-for-different-branches

And the official docs on:  http://git-scm.com/docs/gitignore 

On Sunday, June 10, 2012 2:52:14 PM UTC+2, Alexander Myltsev wrote:
>
> Good day!
>
> I need excludesfile for a specific branch.
>
> $ git config --local branch.master.excludesfile
> +info/exclude_public
> $ ls .git/info/
> exclude  exclude_public  refs
> $ cat .git/info/exclude_public
> TODO.txt
> $ git status
> # On branch master
> # Untracked files:
> #   (use "git add ..." to include in what will be committed)
> #
> #   .gitignore
> *#   TODO.txt*
> nothing added to commit but untracked files present (use "git add" to 
> track)
>
> Does excludesfile work properly on Windows 7? What am I doing wrong?
>
> Regards,
>   Alex
>

-- 
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/-/Ogg_ep1IDu8J.
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.