LoginSignup
2
2

More than 5 years have passed since last update.

gitignore notes

Posted at

Adding gitignore file after git init

Remove the files which you don't want.

# you did git init, added remote, added README file, add and commit then  pushed before making .gitignore
# then you realized that you have unnessary file like README.md.swp
# check what you have in the index
$ git ls-files
$ git rm README.md
$ vim .gitignore # add contents in it and close
# OR use .gitignore_global
$ git config --global core.excludesfile ~/.gitignore_global
$ git rm -r --cached .
$ git add .
$ git commit -m "fixed untracked files"
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2