1

The remote directory already contains a .gitignore file, which I want to overwrite and upload a new one. After doing:

scp -P[portnumber] [email protected]:path/for/file/ location/of/file/.gitignore 

I received the following message:

not a regular file 

What do I need to do to copy the "not regular file" as well as overwrite the existing one? I'm assuming this question is very basic considering that I can't find the answer anywhere. Thank you!

4
  • I have read the following, similar question but it doesn't fully answer my question. unix.stackexchange.com/questions/52634/… Commented Nov 3, 2016 at 19:29
  • 1
    The syntax is scp <source> <destination>. Did you mean to copy from location/of/file/.gitignore to within [email protected]:path/for/file/? If so, you should reverse the order of parameters. Commented Nov 3, 2016 at 19:33
  • I was answering my own question while you were adding this comment. This was actually the source of the problem and if I had known it was that simple, I wouldn't have posted. Sorry! Thanks so much. Commented Nov 3, 2016 at 19:37
  • Possible duplicate of How to copy a file from a remote server to a local machine? Commented Nov 3, 2016 at 20:51

1 Answer 1

1

I had my location and destination backwards. I changed it to:

scp -P[portnumber] /path/to/.gitignore [email protected]:/path/to/destination 

That worked!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.