user2593573
user2593573

Reputation:

Git not commiting files

I created an executable of my Python Software via Py2Exe, which creates two new directories and multiple files in them. I also created a new Python File for doing this, called setup.py.

Whenever I open up Git GUI it shows the only uncommitted changes are in my .idea\workspace.xml file (this comes up with every commit), and setup.py. My other directories and files that I created do not show up. I've tripled checked that the files are in the correct directory (../Documents/GitHub/..), does anyone know of this happening before, or a solution to it?

EDIT: When trying to add the files, I get the error:

fatal: 'C:\Users\me\Documents\GitHub\Project\SubDir\build' is outside repository

EDIT: Fixed the problem, I wasn't able to add the directories on Friday, but today it let me for what ever reason.

Upvotes: 3

Views: 360

Answers (3)

freshvolk
freshvolk

Reputation: 81

In most cases you have to git add path/to/file to have git track the file (or folder), and your GUI may be filtering the non-tracked files.

Because you are on windows, you may have to open the git shell to use git add. I am fairly certain that Github for Windows allows you to add untracked files pretty easily via checkbox or button next to the filename.

Follow the instructions in the middle of this page to open powershell in the git dir: http://windows.github.com/help.html

Then run the git add command (git add path/to/folder path/to/folder2).

Upvotes: 1

akash.trivedi
akash.trivedi

Reputation: 81

If I had to guess...you have to stage the files first. From the command line it is:

 git add *file 1* *file 2* etc.

I haven't used the GUI so I'm not sure of the equivalent process.

http://git-scm.com/book/en/Git-Basics might help.

Upvotes: 0

Slater Victoroff
Slater Victoroff

Reputation: 21914

I'm going to go out on a limb here and say that if the new files aren't showing up in git, then they are in fact not in the right directory. Make sure the directory your files are being created in has a .git directory.

If that is already the case, you want to look at the output of git status on your local repo to see the current status of things.

If the files are showing up in the results of git status but still not in your bizarre GUI tool, try a git add . on your repository directory.

If that still doesn't work then you need to sit down and question why you're using a GUI for git in the first place.

Upvotes: 0

Related Questions