Question for IT dev...
 

Subscribe now and choose from over 30 free gifts worth up to £49 - Plus get £25 to spend in our shop

[Closed] Question for IT devs - Git

6 Posts
5 Users
0 Reactions
52 Views
Posts: 91096
Free Member
Topic starter
 

I get that you clone a repository and work with it locally, and that you stage things before you commit.

However the Git online docs seem to suggest that you can simply commit to a remote repository in the traditional style without cloning. I think I would like to do this in our situation but people online seem to think you HAVE to clone and work locally.

Anyone use it?


 
Posted : 13/10/2016 5:32 pm
Posts: 7090
Full Member
 

I use it, I don't think you can commit directly to a remote repo.

Where does it say that you can in the docs?


 
Posted : 13/10/2016 5:36 pm
Posts: 31206
Full Member
 

Not used it but been through the (fairly crap) [url= https://www.codecademy.com/learn/learn-git ]Code Academy tutorials[/url] on it and they very much went with the clone it locally approach.


 
Posted : 13/10/2016 5:39 pm
Posts: 91096
Free Member
Topic starter
 

Actually I think I may have mis-read this:

https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows#Centralized-Workflow

Never mind 🙂


 
Posted : 13/10/2016 5:39 pm
Posts: 0
Free Member
 

Yeah - basically all git operations are done on a clone of the repo. This is a "good thing" - it means you are not tied to good internet for ability to work.

Of course, you don't have to clone the whole repo - you can, if you choose, do a "shallow clone" only containing the history of the branch you select. Maybe this is what you were thinking of?

There are situations where you want to work on a repo without checking it out and even that is possible via such online tools as http://prose.io (I'm not an expert on that, tbh, just heard about it) or use some of the web editing tools built into things like GitHub.

Rachel


 
Posted : 13/10/2016 5:49 pm
Posts: 4954
Free Member
 

In the git manual there is a sectiin called something like git for CVS users which sounds like it could be useful to you.


 
Posted : 13/10/2016 6:54 pm
Posts: 91096
Free Member
Topic starter
 

Thanks folks.

My large employer has finally got its shit together and rolled out a suite of collaborative working tools for all the stuff we do when not doing stuff on clients' systems. Fantastic, it is.


 
Posted : 13/10/2016 7:32 pm