This error probaby has something to do with my path/environment variables but I don't know enough about those to fix this issue, any help is appreciated.
git pull
git: 'pull' is not a git command. See 'git --help'.
Did you mean one of these?
apple
shell
git --exec-path
/opt/local/libexec/git-core
which git
/usr/bin/git
echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/MacGPG2/bin`
Related
Some time ago i created a 'git' directory in a home path, just to store repos i use. But this somehow broke all my git system and even in ~ folder, when i was trying to use git, i was outputting me this (PWD=/home/user):
$ git status
fatal: This operation must be run in a work tree
I've removed 'git' folder, but appear another problem (PWD=/home/user):
$ git status
fatal: not a git repository: '/home/user/git'
I tried to reinstall git. Not helped. I'm a bit confused about this.
UPD #1:
I'm sorry for bad explanation at the beginning.
This should be clear enough:
$pwd
/home/user/MyGitRepos/some_repo/
$ls -a
. .. .git README.md
$git status
fatal: not a git repository: '/home/user/git'
Any path i am /, /etc, /home/user/ gives me the same output:
fatal: not a git repository: '/home/user/git'
Double-check your environment variables.
If you have GIT_DIR or GIT_WORK_TREE set to /home/user/git, that would explain the error message.
Check also git config -l --show-scope --show-origin in case any configuration would also reference that path.
I'm working on remote repository with git commands on windows cmd and it works well, but when working with git commands in git bash terminal I get error:
Your configuration specifies to merge with the ref 'refs/heads/feature/branch-name'
from the remote, but no such ref was fetched.
How can I fix it for git bash terminal?
Check first, in your git bash session, the ouput of:
git branch -avv
git status
Make sure the name of the branch you are in matches the remote one, especially considering the case (uper/lowercase), in case it is insensitive in a CMD session, and sensitive in a bash session.
See this example.
If the list of branches show the local one is not linked to a remote tracking one, then, as I documented in "[Difference between git checkout --track origin/branch and git checkout -b branch origin/branch][2]":
git branch -u origin/branch branch
It started working when I moved to the main branch (next).
But, when i switch back to my branch this is what I get:
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> feature/branch-name
Finally found the answer here:
Why do I have to "git push --set-upstream origin <branch>"?
git push -u origin <your-local-branch-name>
So if your local branch name is coffee
git push -u origin coffee
I am using git for source control in visual studio 2010. I can use commands like "git status" , "git commit" but when i try to use "git review" i am getting the error as " git: 'review' is not a git command. See 'git --help'."
Help me please
Edit1: i am using "git review" to submit git branches (code) to gerrit for review.
Git review is an external command from git. It is not a command included in git code. You have to install it.
Please follow Git-review documentation to the installation if you intend to use it.
It means that review is not a valid command to be used with git.
For e.g. when you use git add . - git understands that you want to stage all the files that you have changed to be committed. add . is a valid commandment for git to do staging operation.
In similar fashion, review is not a valid command and thus git recommends you to lookout for help by running git --help
What do you intend to do with review command?
EDIT 1: As per comments, adding screenshot of area from where pull
requests are created on github.com
when I need a pull for remote repo, the command 'git pull' dosen't work.
Only create a processe 'git-am.exe' but nothing happens
On Win7 whit git:
$ git version
git version 2.8.0.windows.1
Could you check if you have any remote set in your git? by git remote -v if not, do set remote in order to get pull request.
I want to use difftool as the tool for dealing with git diff's. Specifically, I am used to using Vimdiff on an Linux environment. It doesn't seem that any tools come with git on Windows. I am running a Git Bash and I got the following message:
:~/rush$ git difftool
This message is displayed because 'diff.tool' is not configured.
See 'git difftool --tool-help' or 'git help config' for more details.
'git difftool' will now attempt to use one of the following tools:
kompare emerge vimdiff
What difftools can I use on Windows?
As suggested by #Mah, I did set this up with BeyondCompare and it works! See how to do it here:
http://www.scootersoftware.com/support.php?zz=kb_vcs