Earlier quoted context omitted.
I highly doubt tortoise or any tool can "break" a repo. This might be a sign that you don't understand git either. Now I'm sure it can lead to people who don't know what they're doing doing the wrong thing, but if they're allowed to push somewhere and make it someone else's problem, that's not their fault. They've been forced to use git, so there should be someone else who actually understands git.
“Break” doesn’t mean repo integrity corruption. It means that you try to merge a branch, and it shits itself with hundreds of conflicts that shouldn’t appear and/or has changes that may partially revert the progress made by other merges. if they're allowed to push somewhere and make it someone else's problem, that's not their fault What? This made zeroest sense of the day. Like, I should walk to their desk and check…
Beej's Guide to Git
231–240 of 318 posts
Re: Beej's Guide to Git
#232Re: Beej's Guide to Git
#233I can't help but feel that Git has completely missed the forest through the trees that you can make a 30+ part guide explaining how to use it.
1. git clone
2. git checkout
3. git pull
4. git add + commit + push
5. git reset / rebase
Re: Beej's Guide to Git
#234Earlier quoted context omitted.
This doesn’t work. Look: Commits are sets of files. They form a tree. A branch is a named location in this tree. The index aka staging area is a pre-commit that has no message. Workdir is just workdir, it doesn’t go in the repo unless you stage it. HEAD is whereafter commit will put new changes. Do I understand git? Seems like yes. Let’s run a quiz then! Q? A. How to make a branch? Git branch -a? Git checkout -b --ne…
Knowing how to make a branch is very basics of using git. If you don’t know how to do it (git checkout -b, btw) you are just outing yourself as someone who doesn’t use git or your just push to master i.e. you are only working on solo projects. You can switch branch also with ‘git checkout’ and you just ‘git stash’ your changes. ‘git reset’ is fine to reset files, but again if you just want to ”clean” repo you can sta…
You can reset staged files again with ‘git reset’
To "revert a file to what was staged" you have to "git checkout" again, it seems, not "reset".
This is all basic stuff you should know if you are developing code with other people
Yeah. It seems that it is basic, until you try using it for something that is not quick one-shot patching of "append-only" code.
Re: Beej's Guide to Git
#235Oh my goodness, this is a huge treat. His class networking programming guide sits at one of my top books of all time. Well written, informative, concise, and legitimately get you to chuckle out loud at points. Edit: Does anyone know a good way to convert one of the HTML pages into an epub for reading on an ereader? The PDFs will definitely work, but wanted to see if anyone knew of any tools for HTML -> EPUB conversio…
Try downloading the single-page html and coverting with pandoc:
pandoc index.html -o bla.epub
Maybe it needs some fine tuning, but the result seems good to me.
Re: Beej's Guide to Git
#236Earlier quoted context omitted.
“Break” doesn’t mean repo integrity corruption. It means that you try to merge a branch, and it shits itself with hundreds of conflicts that shouldn’t appear and/or has changes that may partially revert the progress made by other merges. if they're allowed to push somewhere and make it someone else's problem, that's not their fault What? This made zeroest sense of the day. Like, I should walk to their desk and check…
Usually people make pull requests.
Re: Beej's Guide to Git
#237Hey all--if you find things wrong, post 'em. I'll clean 'em up. :) Love, Beej
Not wrong, but since you’re mentioning vim in the context of git, might be worth adding :cq as a way to exit with a non-zero status to prevent git from finishing the commit / operation.
Re: Beej's Guide to Git
#238Re: Beej's Guide to Git
#239Earlier quoted context omitted.
Why does git get a free pass for shitty defaults but perforce doesn’t? Perforce long predates git, and the checkout operation (which can be done on save with any modern editor) fixes that immediately.
Have you actually used P4 in anger? Having to add P4 support to any script, sucks. Having to do a network operation when touching files, sucks. Many many many apps have no idea what p4 is and will never get p4 support. Git gets out of the way.
Yes. I use it every day. I've ran P4 servers that serve hundreds of GBs per day globally with both commit edges and regular proxies. I've written batch scripts, bash scripts, and tooling in python, go and C# around it.
> Having to add P4 support to any script, sucks.
I disagree. It's no worse than adding git support to something. p4 zTag isn't the most elegant thing, but it works.
> Having to do a network operation when touching files, sucks.
Does it? Is it any worse than having to keep the entire history of every file locally on your machine, including any "large files?" And git-lfs as a solution to that means you're now coupled to wherever those files are stored. Making large submits to P4 isn't the nicest experience, but it sure beats paying that price every time you clone a repo IMO.
> Many many many apps have no idea what p4 is and will never get p4 support
In the same way that many people in this thread are blaming a git gui for a problem, "that's not P4's fault". I do agree it's shit though.
> Git gets out of the way.
Until it doesn't.
Re: Beej's Guide to Git
#240> GitHub is a web-based front-end to Git. ¯\_(ツ)_/¯ 208 mentions of GitHub. 4 mentions of Gitea. 3 mentions of GitLab. Why is it so biased and why is it helping to continue to teach people to centralized git.