DEV Community

Wtf is git?

Johannes on November 26, 2018

Introduction Version control... One of the corner stones of the development process. There are a lot of Version Control Systems, but the...
Collapse
 
scrat83_pl profile image
Krzysztof Zaporowski

small remark - there's huge discussion between master-only and feature-branches approach, so I wouldn't be such definite by saying that developer should ALWAYS work with branches. It depends on the situation, as almost everything in our industry ;)

Collapse
 
johannestegner profile image
Johannes

You are right, I will make it more clear that it's a personal opinion (will update after food!). :)

Collapse
 
johannestegner profile image
Johannes

There we go, added a disclaimer at the branches part ;)

Collapse
 
adamdsherman profile image
AdamDSherman • Edited

I use git frequently but it frustrates the hell out of me. It just seems to do random things that no one can explain.

For example, yesterday I merged my code onto our development branch, like I have done hundreds of times before. However, this time the pull request got updated with a whole lot of code from other people's branches - hundreds of files I had never touched. This happens not often, but with some regularity. No one in my team knows why and the only advice given is to copy out your files and start a new branch form scratch.

Right now, too, I am trying to update a local development branch: 'git pull origin dev-branch' but am getting the error Could not read from remote repository. Again, no one knows why. I can access the repo fine on Github and it was working fine yesterday, but today it's not (and is costing me hours of time in debugging).

Git just seems way too temperamental to me. Does anyone else have this similar experience?

Collapse
 
johannestegner profile image
Johannes

Have not noticed that type of issues if I don't count the times people have used git commit -a, could it be that your git client changes line endings or "lint fixes" files? Or that you merge/rebase other peoples branches before pushing?

Could not read from remote repository. I get when the repository is down or my net is broken, could that be the issue in your case?

Collapse
 
johannestegner profile image
Johannes

I do like rebase in many cases (even if it might mess up the history a small bit), but I choose to leave it out in this part, as it's a slight bit over the general level of the text, hehe. A good point though!

Collapse
 
johannestegner profile image
Johannes

Nice, good links :)