Git: untrack a file in local repo only and keep it in the remote repo
2016-10-13 16:51
429 查看
You could update your index:
and make sure it never shows as "updated" in your current repo.
That means it won't ever been pushed, but it is still present in the index.
(and it can be modified at will in your local working tree).
to revert that state (from git-ready):
to see all assume unchanged files (from Gabe Kopley's comment)
git update-index --assume-unchanged nbproject/project.properties
and make sure it never shows as "updated" in your current repo.
That means it won't ever been pushed, but it is still present in the index.
(and it can be modified at will in your local working tree).
to revert that state (from git-ready):
git update-index --no-assume-unchanged
to see all assume unchanged files (from Gabe Kopley's comment)
git ls-files -v | grep '^h '
相关文章推荐
- How can I recover a file that I deleted in my local repo from the remote repo in Git?
- A class file was not written. The project may be inconsistent, if so try refreshing this project and building it. eclipse提示错误
- git commit时出现的问题The file will have its original line endings in your working directory
- Relationship between java file name and the declared class name in it
- Inaccurate values for “Currently allocated space” and “Available free space” in the Shrink File dialog for TEMPDB only
- A class file was not written. The project may be inconsistent, if so try refreshing this project and building it. eclipse提示错误
- add cool toolbar 256corler is easy,only two file and onCreate func is needed also the MainFrame.toolbar must resize to what real need and also the load width is same to it.
- Interactive between local repository and remote repository in git
- Database 'xxx' cannot be upgraded because it is read-only or has read-only file Make the database or files writeable, and rerun recovery.
- A class file was not written. The project may be inconsistent, if so try refreshing this project and building it
- Git提交时提示‘The file will have its original line endings in your working directory’
- .NET错误The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework
- use MyButton is simple,only add two file and then add some code just bellow in any dlg src declear the button control and will ok!
- BI Java 补丁错误处理 :Cannot login to the SAP J2EE Engine using user and password as provided in the Filesystem Secure Store. Enter va
- What is the GlobalSuppressions.cs/GlobalSuppressions.vb file and why is it needed
- Matrix and linear algebra in F#, Part IV: profile your program, find the bottleneck and speed it up: using matrix multiplication as an example[z]
- You should be the top dog in your department and always keep an eye on the outside world.
- Question 12: In C++, which of the following is the best declaration for an overloaded operator[] to allow read-only access (and
- Sharepoint Error : The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- How to Change the Icon for a File Type in Windows 7 and Vista(转)