Problem: files from .gitignore are pushed to github
- created new repo on github from my repl
- created .gitignore via shell in repl
code_to_ignore.py into .gitignore
- executed in shell from root
git add .
git comit -m 'some commit'
Expected result: no file
Got result: all the files are on github
appreciate any help
Hey, @amikhailovskaia welcome to the forums!
Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!
Also see this guide on how to share your code:
Git will still track and include them in the repository. The
.gitignore file only affects files that are untracked at the time the file is added to the ignore list
try these commands
git rm --cached code_to_ignore.py
git commit -m "Remove files from Git tracking"
replace “Remove files from Git tracking” with the actual files, well its a commit message so adjust it as you deem helpful
It was really helpful,
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.