Why does git status show branch is up-to-date when changes exist upstream?
2022-03-30
Question Changes exist upstream in a tracked branch, but when I type git status it indicates that my local branch is up-to-date. Is this new behavior, did I change a config setting, or is something wrong? ubuntu@host:/my/repo# git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean ubuntu@host:/my/repo# git pull remote: Counting objects: 11, done. remote: Compressing objects: 100% (11/11), done. remote: Total 11 (delta 6), reused 0 (delta 0) Unpacking objects: 100% (11/11), done.…
Git: cannot checkout branch - error: pathspec '...' did not match any file(s) known to git
2022-03-28
Question I'm not sure why I'm unable to checkout a branch that I had worked on earlier. See the commands below (note: co is an alias for checkout): ramon@ramon-desktop:~/source/unstilted$ git branch -a * develop feature/datts_right feature/user_controlled_menu feature/user_controlled_site_layouts master remotes/origin/HEAD -> origin/master remotes/origin/develop remotes/origin/feature/datts_right remotes/origin/master ramon@ramon-desktop:~/source/unstilted$ git co feature/user_controlled_site_layouts error: pathspec 'feature/user_controlled_site_layouts' did not match any file(s) known to git. I'm not sure what it means, and I can't seem to find anything I can understand on Google.…
View a specific Git commit [duplicate]
2022-03-27
Question This question already has answers here: </div> Closed 11 years ago. Possible Duplicate: Get Information about a SHA-1 commit object? I needed to check when a specific change was added to a file I'm working on, so I used the git blame command. From that I obtained the hash of the relevant commit. Is there a way to see the log notes of just that commit, using the hash? All the docs talk about how to look at the whole tree.…
fatal: early EOF fatal: index-pack failed
2022-03-26
Question I have googled and found many solutions but none work for me. I am trying to clone from one machine by connecting to the remote server which is in the LAN network. Running this command from another machine cause error. But running the SAME clone command using git://192.168.8.5 ... at the server it's okay and successful. Any ideas ? user@USER ~ $ git clone -v git://192.168.8.5/butterfly025.git Cloning into 'butterfly025'... remote: Counting objects: 4846, done.…
Applying a git post-commit hook to all current and future repositories
2022-03-24
Question I've written a Git post-commit hook and it works correctly. However, I want to add this hook to apply to all current (and future) Git repositories I am working on. I tried adding the hook to my ~/.git/hooks/ directory instead of in the hooks directory in the project directory, however, this did not seem to work. Is there a way to create global Git hooks that will apply to all repositories on my system (without having to copy them into each project directory)?…
Git diff against a stash
2022-03-23
Question How can I see the changes un-stashing will make to the current working tree? I would like to know what changes will be made before applying them! Answer See the most recent stash: git stash show -p See an arbitrary stash: git stash show -p stash@{1} From the git stash manpages: By default, the command shows the diffstat, but it will accept any format known to git diff (e.g., git stash show -p stash@{1} to view the second most recent stash in patch form).…
What does the term "porcelain" mean in Git?
2022-03-23
Question The term "porcelain" appears occasionally in the Git documentation. What does it mean? Answer "Porcelain" is the material from which toilets are usually made (and sometimes other fixtures such as washbasins). This is distinct from "plumbing" (the actual pipes and drains), where the porcelain provides a more user-friendly interface to the plumbing. Git uses this terminology in analogy, to separate the low-level commands that users don't usually need to use directly (the "…