try:
git ls-files --error-unmatch <file name>
will exit with 1 if file is not tracked
More Related Contents:
- git command for making one branch like another
- GitHub folders have a white arrow on them
- What’s the difference between HEAD, working tree and index, in Git?
- What are the differences between git branch, fork, fetch, merge, rebase and clone?
- How to remove selected commit log entries from a Git repository while keeping their changes?
- Git: “Corrupt loose object”
- How to read the output from git diff?
- How to use git bisect?
- What are the file limits in Git (number and size)?
- How do I tell Git to ignore everything except a subdirectory?
- Using Git, show all commits that are in one branch, but not the other(s)
- How to get the changes on a branch in Git
- Git branching: master vs. origin/master vs. remotes/origin/master
- Creating SSH keys for Gerrit and Hudson
- How does git commit –amend work, exactly?
- Detach many subdirectories into a new, separate Git repository
- Git – finding the SHA1 of an individual file in the index
- Is there a way with to prevent “git stash pop” from marking files as modified?
- Visual Studio Code is always asking for Git credentials
- How do negated patterns work in .gitignore?
- Git: How to reset a remote Git repository to remove all commits?
- Error “Fatal: Not possible to fast-forward, aborting”
- How can I list all the deleted files in a Git repository?
- Renaming a branch in GitHub
- Git: Merge a Remote branch locally
- Using two git repos in one folder
- git push fails: `refusing to update checked out branch: refs/heads/master`
- Git and Team Foundation Server
- Git merge branch into master
- How to push a shallow clone to a new repo?