Git command moves me out of current directory into parent directory
I’ve been having an issue with git. When I execute a command it will push me out of the working directory and into the parent directory. This happens somewhat frequently, maybe 25% of any git command
So I will do something along the lines:
- SVN : 500 internal server error on my repository access
- Git push/clone not working using HTTPS without any sort of firewall/proxy only in Ubuntu
- Where to store public key for ssh on ubuntu?
- Apache basic authentication issue with reverse proxy
- gitk “package require Tk”
- How do you push code with gitg?
$user at ubuntu-machine in /var/www/project/name: git add . $user at ubuntu-machine in /var/www/project/name: git commit -m "Git message" $user at ubuntu-machine in /var/www/project/name: fatal: Not a git repository
I’m currently running Ubuntu 16.04 with git version 2.7.4.
Has anyone else had this issue? Possible reasons why it’s happening?
Any help is appreciated, thanks
2 Solutions collect form web for “Git command moves me out of current directory into parent directory”
I resolved my issue by updating from 2.7.4 to 2.11.0
sudo add-apt-repository ppa:git-core/ppa sudo apt-get update sudo apt-get upgrade git git-man
it looks good to me as long as you initialized the directory…. if not then… you should initialize your directory first with: