简体   繁体   中英

Git workflow - Not working locally

I am trying to create a workflow using Git where all files are stored remotely. Instead using git clone and have all files be stored on my computer locally I want to have them all stored on a server. Does this kind of workflow exist and what is it called?

Ideally I'd like to just use Git and it's features like branching, merging, rebasing, etc but have no files on my computer directly. If it exists, is it slower than running git locally?

This is not how Git works. The copy of the repository that the server holds is constructed and managed differently than the clones intended for editing - you can't/shouldn't edit the server copy directly. Even if you could, the server isn't capable of handling failure cases like merge conflicts - that needs to be done by a human on the client side.

You could always set up a server to SSH into and do your editing. It wouldn't be directly on the Git server, but you'd also avoid checking out the repository to your "local" computer. This is just a matter of semantics, but might suit you.

If you host your repository somewhere like GitHub , you can perform basic work in their web UI; including editing, branching, merging, etc. You won't have access to the more powerful functionality, like rebase -i , but the common workflows are available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM