50

I am having trouble using git on my own server. I am having trouble where I add the origin path (remote add) as I am entering the wrong url. By finding out the correct path to the .git repository on my server, I should be able to enter that into remote add and it should now find the git repository. So, what I would like to know is how can you get the current path of the folder you are browsing via SSH?

Thanks

2 Answers 2

115

If the remote host is Unix-like, type pwd.

0

I use this bash script to copy the path to any directory to clipboard

readlink.sh

readlink -f $1 | xclip -selection clipboard

Usage:

  • readlink.sh ./ # current directory
  • readlink.sh /path/to/somewhere/over/the/rainbow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.