git-status

git status: how to ignore some changes

Is there a way to have git status ignore certain changes within a file? Background I have some files in my repository that are auto-generated (yes, I know that's typically not recommended, but I have no power to change this). Whenever I build my tree, these auto-generated files have status information updated in them (who generated th...

git: programmatically know by how much the branch is ahead/behind a remote branch

I would like to extract the information that is printed after a git status, which looks like: # On branch master # Your branch is ahead of 'origin/master' by 2 commits. Of course I can parse the output of git status but this is not recommended since this human readable output is liable to change. There are two problems: How to know...

Is there a way to tell git-status to ignore the effects of .gitignore files?

I have configured numerous .gitignore files to filter out many different unwanted files from a set of about 6,000 untracked files. I want to do 'git add .' when I've got my filtered list looking the way I want it. But, then I want to disable the .gitignore filters temporarily to see what got left behind, and make sure there was nothing ...

How to do 'git status' on untracked directory?

I have 6,000 untracked files in one subdirectory and I'm constructing .gitignore files to filter out the unwanted ones. I'm testing my gitignore filters as I go by running 'git status'. However, I have a larger number of untracked other files in a different subdirectory, so 'git status' shows all of those too, which makes it very hard t...

Git: how to create different unmerged states?

When different git status' unmerged states like added by us, added by them or both deleted occur? I've tried to reproduce the latter by performing a merge where a file has been deleted in the current and merged-from branch, but I was not able to create this file state? ...

Git: list only "untracked" files (also, custom commands)

Is there a way to use a command like git ls-files to show only untracked files? The reason I'm asking is because I use the following command to process all deleted files: git ls-files -d | xargs git rm I'd like something similar for untracked files: git some-command --some-options | xargs git add I was able to find the -o option t...

Is the full path required to unstage a file in GIT if am currenlty under a sub-directory?

Repo: mergetest $pwd /gitvobs/mergetest/apple $git status On branch br1 Changed but not updated: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) **modified: inside** $git checkout inside error: pathspec 'inside' did not match any file(s) known to gi...