Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitignore without an initialized repo #347

Closed
matthewmueller opened this issue Apr 10, 2015 · 2 comments · Fixed by #1047
Closed

.gitignore without an initialized repo #347

matthewmueller opened this issue Apr 10, 2015 · 2 comments · Fixed by #1047

Comments

@matthewmueller
Copy link

A lot of times when I'm just creating a project, I want to add a few files and directories to the .gitignore, before setting up git.

The behavior before was to just run git ignore node_modules and it would create a .gitignore file, not it's errors out with Not a git repo!. I understand why this is here, but it forces you to manually create the file and add these files before committing.

@spacewander
Copy link
Collaborator

Well, we can change the behaviour.
Instead of exiting, we can just warn the user that they are outside of a git repo.(Or there should be a git repo, in your case).
What about your opinion? @hemanth

@hemanth
Copy link
Collaborator

hemanth commented Apr 11, 2015

Well, I would just do git init && git ignore node_modules anyway one would have to do a git init and add the required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants