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.

@kev sounds like you want a submodule or sub tree, actually. You can’t have different paths across repo clones, though, so you can’t do this unless you specifically set up the remote as just the example folder’s contents.

Follow

@kev Also, either way you go will be complicated if your commits that change example/ also changed other paths. So much so that you might want to start your remote afresh, and then import the sub(module|tree) back into your first one, which would erase your history, alas.

· · Tootle for Mastodon · 0 · 0 · 0
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.