Any needs out there? I need your help please...

So, let’s say I have a repo that contains a folder called “example”. There are many other files and folders in this repo too.

Is it possible for me to run a git push command that ONLY pushes the contents of example to the root of the remote git repo?

So after I push /example/test.txt to my remote repo, it would be test.txt world be in the root of the repo, not /example.

Follow

@kev
Depends on the purpose, I'd say.
If you want to have this structure only at the repo, but not local (for whatever reason), then you could cp or mv the folder contents to the root, commit + push, and then revert that commit.

Of course the next commit+push would revert it altogether. So the reason for this would be worth to know.

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.