English 中文(简体)
在建立存放处和公布档案之后,创建“gitignore”档案?
原标题:Create a .gitignore file after creating the repository and publish .idea file?

I already create a repository in my github account. But now I want to upload my idea file that pycharm created. That s why I need a .gitignore-file. I know that we created a gitignore-file when creating a new repository. But how can I create a gitignore-file after creating and pushing this repository?

问题回答

A gitignore file is just a file you can create when you want, that is called ".gitignore" (and will list the patterns of files that you don t want to add in your repo). If it doesn t exist on your repository, you can create it, commit and push it. Regardless of the gitignore file, you can add and commit the .idea file since they are not related.

http://www.atlassian.com/git/tutorials/util-changes/gitignore”rel=“nofollow noreferer” https://www.atlassian.com/git/tutorials/util-changes/gitignore

如果你愿意,你可以制作<代码>。 在若干国际民主和选举援助学会中,如果你制定并启动新的方案,它就已经有一个<条码>。

如果储存库存在、承诺和推进物已经执行,包括<代码>.idea-files,你必须un Line<>。 <代码>.idea -files。

有了以下指挥,你可以将档案从存放处删除,而不实际删除:

git rm --cache directory/to/.idea

在发出这一指令后,如果你实施并推进这一变化,就应当忽视你的工作。

git commit -m "add gitignore file"
git push




相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...