开发者

Git push to a folder

开发者 https://www.devze.com 2023-03-24 11:53 出处:网络
I am creating a port of an app for win mobile 7 and I would like to push my master to \"master/platforms/windowsmobile7\" of the remote server.

I am creating a port of an app for win mobile 7 and I would like to push my master to "master/platforms/windowsmobile7" of the remote server.

is there a simple way of doing this without creating a whole tree structure and moving my pr开发者_C百科oject directory to somewhere else.


Your local copy of the remote repository is supposed to be a clone of it. You don't "push a folder" or a file, or a tree. You push commits. These are differences between two states of the repository.

So, I would say :

  • I don't think there's a way of doing what you want to do
  • It wouldn't be good practice

If you want to have sub projects in a repository, usually git submodules is the way to go.


It seems to me like you just want another branch: git checkout -b windowsmobile7 It's generally recommended to try to factor out platform-specific code into modules, though. That makes it easier to maintain common code over time.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号