4 ms·
Wow! Did not expect this to be upvoted, or all the hate that came out of this. Allow me to respond: I have never collaborated that way, when I work with other
by jenius 15y ago
Wow! Did not expect this to be upvoted, or all the hate that came out of this. Allow me to respond:
I have never collaborated that way, when I work with other devs (which I do full time), we make a project repo and push and pull to that repo. If we are working on specific features, we use branches. I have never heard of or seen the multiple repo approach, so I can't comment on that.
When I work with other people, we often come over to each others' computers to talk something out, take a look at a merge conflict, or debug things. When this is the case, it's a lot easier when the people that are working together have similar setups or use similar tools - this way it's easy to sit down at their computer and take a look at things.
- philwelch 15y ago> we make a project repo and push and pull to that repo Do you make commits directly to the remote repo, or do you have local repos that you push and pull to the remote from?
- jenius 15y agoDirect commits to github repo. We usually have a master and develop branch as well as smaller branches for separate features if needed. These are not massive enterprise scale projects, and usually there are 2 to 4 devs working on it at once, for perspective. Edit: Sorry apparently this wasn't clear. I make commits to a local repo and push to github. The local and github repos are rarely out of sync.
- philwelch 15y agoSo you never "git clone" to your local machines? You don't "git push" and "git pull"? I've never heard of anyone using Git that way.
- fr0sty 15y agoIt is not, to my knowledge, possible to commit directly to github. You can create a commit locally and push it to github, sure, but that is not the same thing. What commands do you use to accomplish this?
- jenius 15y agoQuick clarification - I misunderstood the original argument here. Yes there are local repos and a github repo, absolutely. I almost ignore the local one because it only exists (for me) in order to be pushed up to github. This is correct. The repo doesn't care what the individual users are using, and it can't tell. On the flip side, this was never something I disagreed with. I was saying that I often work with other devs in person and we will frequently go over to each others' computer to talk something out, debug something, etc. In this aspect, it's easier to use similar tools. If you always work in complete isolation, disregard this part of the article. I just assumed that most people don't.
- lnguyen 15y agoYou're already working in the multiple repository approach (project and local). It's (almost) impossible not to with git.
- leoedin 15y agoI think maybe you're confusing terminology. I'd imagine that tzs is referring to the fact that git is a distributed revision control system. Each user (should) have their own local repository. Users commit, branch etc their local repository, and then push to a central repository. You can (and many people do) use git without ever having a central repository to push or pull from. By definition collaborative git is always multiple repo (unless you're doing something weird like all using the same working directory in a network share, but that'd defeat most of the purpose of git and be a terrible idea). You work on your own repo, and then push changes when you're done. tzs is right in that what tool I use to manage my local repo is irrelevant to the operation of the repository. Git doesn't mind what tool I used. When it does matter how you're committing is if you're discussing doing things in git - it can cause confusion when someone's trying to find a GUI menu to do something. The remote server argument's also valid, and probably the best reason to encourage people to use the command line. I've never found a git gui that was better than the command line, and the command line is the de-facto subject of tutorials. I agree with your overall theme of "use the command line".