dcaz
dcaz

Reputation: 909

push 1 script out of many to a unique repository

I have my main repository and inside my many scripts I have 1 script I want to go to another repository.

Is this possible ?

I know I can make a separate repo and directory, place the script in there and then push that way but I was thinking there must be to push 1 item in a repo.

Upvotes: 1

Views: 26

Answers (1)

Code-Apprentice
Code-Apprentice

Reputation: 83557

I know I can make a separate repo and directory, place the script in there and then push that way but I was thinking there must be to push 1 item in a repo.

That's the only way. This is because a directory IS a repository when it has a .git subdirectory. There's no way to separate these two concepts. So whatever is in that directory that you committed cannot be separated out other than just make another repository/directory.

Upvotes: 2

Related Questions