Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to checkout .git

Tags:

git

My boss gave me a path: xxx@yyy:git/zzzz.git
I tried git checkout xxx@yyy:git/zzzz.git, but got "fatal: Not a git repository Failed to find a valid git directory." I also tried xxx@yyy:/git/zzzz.git and xxx@yyy://git/zzzz.git, all returned the same information I also tried git branch, but got "fatal: Not a git repository" What should I do? Thanks!

like image 656
newman Avatar asked Jun 29 '26 08:06

newman


1 Answers

http://gitimmersion.com/ is a good GIT overview, you should go through that before you start using git. As mentioned already you should do

Clone repro

$ git clone xxx@yyy:git/zzzz.git

Assign the original repo to a remote called "upstream"

$ cd zzzz
$ git remote add upstream xxx@yyy:git/zzzz.git
$ git fetch upstream
like image 149
oluies Avatar answered Jun 30 '26 21:06

oluies



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!