I know there are lots of duplicate questions but I'm fully confused. I should admit I'm completely new to Git. I'm using RabbitVCS, However, I edit the .gitignore file using gedit manually. That's what I have done:
- I have created a repository in Github.
- I cloned it in my local computer using RabbitVCS.
- I have pasted all files and folders of project into the repository.
- I have created a
.gitignorefile in the root of repository which includes this pattern:*~.
I haven't commited anything yet.
I want to ignore all ~ and such other temp files in root and sub-directories. It ignores all files in root, but has no effect in sub-directories. When I want to commit using RabbitVCS, I can see them in the commit window.
I'm confusing because in Bazaar, we first add files, then commit them. But it Git, it seems we should just commit to add new files! Is it right?
What am I doing wrong? should I commit first?
From the gitignore manual:
As Jan Hudec writes, you can just use
*~: