You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I am quite confused by the several subtle variations of the above question that result in a completely different thing being asked.
Basically I want to add a file into my repository so that whenever I clone my repository this file gets created. However, I do not want any changes to be tracked so basically Git will ignore the changes done to the file AFTER it has been committed into the repository the first time.
I want the file to exist in the repository so it is always created when I clone the repository but, it must not be deleted, but further any changes should be ignored.
How do I achieve this in SourceTree or directly in Git?
You can do it cmd line or in sourcetree, it does not matter. You need to add the file and add a .gitignore file. Then commit it and push it to the remote. Any changes down to the file are ignored by git. Unless you willingly add them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, I just added the file into the gitignore list, however, it still shows up in the unstaged files list in sourcetree.
Using the git status --ignored does not show it in the Ignored files list :|
The file is added into the repository so it is created when the repository is cloned. But, I want any further changes to be ignored. I don't know if an added file can be ignored using the .gitignore list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I was mistaking, you need to execute the following command:
git update-index --assume-unchanged <file>
This will let git ignore the file locally.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, and how do I know what files have this attribute applied to them?
Is it possible to do this from the SourceTree GUI?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.