Rutwick Gangurde
Rutwick Gangurde

Reputation: 4912

Git - Push a folder after changing the remote?

I have a local WordPress setup, and I used to push only my theme and plugin folder to a local repo, left the other files as they are. Now I have changed the remote, and want to do the same thing, meaning, just push my plugin and theme folder to the remote. But since they were already committed and pushed to my local repo, I cannot see them using git status. How would I force push them to my new remote repository?

Upvotes: 1

Views: 79

Answers (1)

VonC
VonC

Reputation: 1323413

Even if they are already committed, you still can push to the new remote:

git push origin master

If origin refers to a new remote which doesn't have those commits yet, the push will proceed.
That will, however, push commits, not folders.

Upvotes: 3

Related Questions