On Monday, April 28, 2014 10:39:40 PM UTC+2, Michael Laird wrote:
>
> My Windows7 directories are as follows:
> C:/User/Me/Projects/newProject
>
> My home pointer for Git Bash is User/Me/Projects and in Git Bash, it also 
> says (master)
>

What's a home pointer? Usually, the designated home directory is in 
C:/Users/{username} - you can check this by entering "echo $HOME" in Git 
Bash, or "echo %userprofile%" in the regular Windows command line window.
 

> I have a .gitconfig and a .gitignore in the Projects directory. I guess 
> that .gitconfig was created by the git config --global command. That 
> .gitconfig file says the core.excludesfile 
>
is   excludesfile = ~/.gitignore   , which I hope directs git to the 
> .gitignore file in the same directory. 
>

I'm really unsure about that. You're better off getting your system back to 
normal so that your home directory/pointer is in Users/{username} - which 
should be the same place ~ is pointing to. 
 

> I created that .gitignore file and populated it with suggestions from 
> GitHub to ignore things like .com files and OS generated files, all of 
> which are intended to be general exclusions to any project.
>

Just for clarity, .gitignore files are a convention for ignore files that 
are automatically read by Git inside repositories. I would name the global 
excludesfile differently. Maybe .global-excludes or something like that, 
and reconfigure excludesfile to point at this. Just so you don't mix them 
up.
 

> I have a .git file in Projects. I am hoping that is where the repository 
> for newProject will have its contents. Its not clear to me how it got there.
>

Git has no notion of .git files. There's a .git/ directory at the root of 
every Git repository. You can create a new repository like this:

cd ~/Projects
git init my-new-project

The above command will create a new directory my-new-project/ - and inside 
of it will be only a .git/ directory with all the Git repository goodness 
inside.
 

> I have a .gitignore file in newProject with some specific exclusions for 
> that project.
>

Yes, that sounds right.
 

>
> Is this set up correctly? Are there git commands that I could use to 
> confirm that exclusions work as I expect, before I commit. I dislike 
> cleanup, and find git documentation to be "modest", at best. It has taken 
> me many days to get this far.
>

Generally it's a good idea to review the output of git status thoroughly so 
you don't accidentally add and commit any files that you would've rather 
had ignored. So the pattern goes 

git status
# add any files you don't want to .gitignore
git status # again, and so on.

If you want to see what files are being ignored already, add the --ignored 
flag:

git status --ignored

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

Reply via email to