News for hackers. Stuff that matters.
Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @12:42PM (#27998431)
Why would that be surprising? For a single programmer working alone Git is an incredibly complicated tool.

P.S.: A lot of you are confusing "complicated" with "difficult".

Re:How Dwarf Fortress is built by kapp_in_life on Thursday July 29, 2021 @12:47PM (#27998492)
Is it? That's when git is simplest, having a single branch and never merging removes most of the complexities of git.
Re:How Dwarf Fortress is built by epolanski on Thursday July 29, 2021 @06:55PM (#28002466)
Why tho?

You can create as many branches as you want and do all the experimentation you want.

When I stopped caring about committing and branching (something I’ve too long associated with pushing code, like reaching milestones) and started doing both as much as possible I really felt lots of freedom.

Instead of overthinking I can create parallel different approaches and see where they lead to. It’s amazing.

Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @12:57PM (#27998614)
Sure, but it also removes most of the reason to use Git.
Re:How Dwarf Fortress is built by hhjinks on Thursday July 29, 2021 @01:05PM (#27998713)
Don't underestimate all the useful information a complete git log contains, even for solo developers. You can look years back and find out exactly why a change was made.
Re:How Dwarf Fortress is built by outworlder on Thursday July 29, 2021 @03:51PM (#28000615)
The main reason is the ability to undo mistakes. Or compare working code with non-working code (including bisect)

That's very valuable even when solo, and worth typing a "commit" command once in a while.

Re:How Dwarf Fortress is built by potatoman22 on Thursday July 29, 2021 @01:05PM (#27998709)
In my experience, most people use git as version control. Branching etc is very useful, but not necessary for a 1-person project.
Re:How Dwarf Fortress is built by tonyedgecombe on Thursday July 29, 2021 @01:37PM (#27999093)
I find branching useful whilst working on my own, I certainly wouldn't want to go back to CVS/SVN.
Re:How Dwarf Fortress is built by flatiron on Thursday July 29, 2021 @01:10PM (#27998774)
It is if you want to bug fix released items but keep steam rolling features for the next version.
Re:How Dwarf Fortress is built by emteycz on Thursday July 29, 2021 @01:06PM (#27998719)
I invite you to try using Git as much as possible for two weeks. After a week I started using Git for branching out of my main branch to test several different ideas and then compare them at once with other developers - colleagues or friends. I think that moved the meetings and discussions with my teammates up a level.
Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @01:13PM (#27998812)
I have used Git when working with FOSS projects, and I tried using it for my own but it never took. The sort of workflow it is built for just isn't how I like to do things when I work on my own.
Re:How Dwarf Fortress is built by mypalmike on Thursday July 29, 2021 @02:45PM (#27999910)
Solo workflow is as simple as write code, git commit, repeat. Throw in a git push every once in a while. All on master, no branching or forking.
Re:How Dwarf Fortress is built by galaxyLogic on Thursday July 29, 2021 @07:00PM (#28002505)
I do a lot of that in my solo project. I would add to your list "write a commit comment". It's like keeping a journal you can go back to. It gives me time to stop and think what have I done, what needs to be done next.

I don't much read my git-commit-comments but I think it is useful to write them.

I don't usually branch, at least at this stage of the project. Probably yes when I go to production when there is a need to fix bugs in the released version(s) without having to put all the latest code into it.

Even without branching commits are a good way to save the latest known good state I can easily go back to if things didn't work out.

Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @04:24PM (#28001031)
That's a lot of commandline I don't normally have to bother with. And if I'm not living in the commandline then I only end up running git when I reach some milestone I want to back up... which I can do just as easily with 7zip without installing anything I don't already have, and I can copy archives to my NAS without having to set up some remote repo.

You can try and convince me until you're blue in the face dude, but I've tried it and I just don't like it. End of story.

Re:How Dwarf Fortress is built by p1necone on Thursday July 29, 2021 @07:52PM (#28002946)
You don't have to use the command line, most code editors have built in UI for this, especially when you're only using these basic git features.
Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @08:05PM (#28003033)
I just use Notepad++. I like to keep my development environment simple.
Re:How Dwarf Fortress is built by p1necone on Thursday July 29, 2021 @07:50PM (#28002938)
When I'm hacking away on a personal project a huge amount of value in git (probably moreso than any other feature) just comes from having "what's in the repo" and "what I've changed today" (uncommitted changes) visible as diffs.
Re:How Dwarf Fortress is built by burnt_toast on Thursday July 29, 2021 @01:54PM (#27999352)
Personally, I started using git for my projects after I accidentally deleted a good chunk of source code and my closest backup was several weeks old.
Re:How Dwarf Fortress is built by GordonS on Thursday July 29, 2021 @03:51PM (#28000626)
The exact same thing happened to me, and I kicked myself hard for it. At the time I used source control at work (TFS and SVN; git wasn't yet ubiquitous), so I didn't really have an excuse.

I've used source control for all personal projects since, and it's in no way a burden. In fact, there have been another couple of instances since the first, where I would have lost a bunch of work without it.

Re:How Dwarf Fortress is built by ornornor on Friday July 30, 2021 @02:35AM (#28005095)
How? It’s very hard to completely lose code in git. Did you know about the reflog?
Re:How Dwarf Fortress is built by Pet_Ant on Thursday July 29, 2021 @12:46PM (#27998482)
Or any other is the point. I mean even locally I depend on commits as save points to just allow me to go crazy and experiment with the code. I mean you can just copy the codebase elsewhere as backup but using git or mercurial is easier than that.
Re:How Dwarf Fortress is built by nolok on Thursday July 29, 2021 @12:55PM (#27998583)
Not saying you're wrong, but to explain "how is that possible over 20 years without ever blowing things up": he says he uses visual studio since the beggining (the full blown ide).

Since he's working alone, he can easily use the local backup feature of it, which allow to easily rollback to automatically made copies of files, diff and cherry pick between current and backups, etc ... It's basically done automatically for you.

As long as you save your project regularly and don't need to merge code with anyone, it can go a long way.

Re:How Dwarf Fortress is built by nhooyr on Thursday July 29, 2021 @01:43PM (#27999176)
No it isn't! It's so easy and effective for keeping track of your work and backups.

If you want the absolute simplest way to use git, just setup an alias to do:

  alias gcmp="git add -A && git commit && git push"
Now all you need to do is run gcmp every time you're ready to log the new state of your codebase. How could it be simpler?

git only becomes more complex as your needs become more complex. At which point I'd recommend using something like https://magit.vc/ which makes complex git operations far easier. The CLI can only take you so far effectively unfortunately.

Re:How Dwarf Fortress is built by Yajirobe on Thursday July 29, 2021 @01:52PM (#27999313)
git commit to which branch? git push to which branch?
Re:How Dwarf Fortress is built by thebean11 on Thursday July 29, 2021 @02:11PM (#27999574)
Master/main? It's a single branch workflow.
Re:How Dwarf Fortress is built by mypalmike on Thursday July 29, 2021 @02:52PM (#27999970)
master, origin/master
Re:How Dwarf Fortress is built by p1necone on Thursday July 29, 2021 @07:47PM (#28002917)
I can't imagine working on any personal project without git. How often have you been working on something for a while, noticed part of it that was working before was now broken and had no idea why. If you'd been making regular commits to git you could go through recent/pending changes and work out was was different trivially.

Git is also incredibly simple on single person personal projects, just git init, git add, git commit and some way to view the history and pending changes (either the command line, or most editors have a built in viewer).

Re:How Dwarf Fortress is built by AstralStorm on Thursday July 29, 2021 @12:46PM (#27998484)
Actually extremely easy. Git add -a, git commit, git push.

It only gets complicated if you try to do complicated things.

Re:How Dwarf Fortress is built by nhooyr on Thursday July 29, 2021 @01:44PM (#27999189)
I believe it's:

  git add -A
With a capital A.
Re:How Dwarf Fortress is built by fatbird on Thursday July 29, 2021 @01:11PM (#27998784)
Change history, if nothing else. That alone brings a ton of benefit, from being able to view earlier versions, to recovering from mistakes or lost code.

If you have a remote repo then, you can also have offsite backups. If you never branch, it's still massively worth it.

Re:How Dwarf Fortress is built by asciimov on Thursday July 29, 2021 @03:57PM (#28000705)
Does git have benefits, yes.

Are git commands obtuse and unfriendly, yes.

The problem is that git is not intuitive and isn't automatic. I've seen more people loose code to git than be saved by having their repo offsite.

Re:How Dwarf Fortress is built by Bayart on Thursday July 29, 2021 @03:27PM (#28000346)
Basic git-fu (init, add, clean, commit, pull, push, branch, merge, stash, log) goes a long way to make your life easier. You can leave the fancy stuff for later.

There are even git repos of 99% done .gitignore files for most needs [1], which is most of the setup work for a solo project.

[1]: https://www.toptal.com/developers/gitignore

Re:How Dwarf Fortress is built by mwaitjmp on Thursday July 29, 2021 @04:55PM (#28001381)
The official github desktop app is really nice to use as well. At least on a Mac.
Re:How Dwarf Fortress is built by Bayart on Friday July 30, 2021 @02:13AM (#28004976)
The best graphical Git client I know about is Sublime Merge, if you want to try something new.
Re:How Dwarf Fortress is built by wisemanwillhear on Thursday July 29, 2021 @01:27PM (#27998947)
While Git is not without it's complexities, but as a developer who must use it with teams anyways, I find there are very simple workflows with almost no cognitive load that I'm able to use for my personal projects. Not only does this give me snapshots of my projects from any point in time, but backups as well since I use a free GitLab account as well.
Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @01:33PM (#27999016)
Yeah sure, but for someone who's workflow started 20 years ago without Git, it shouldn't be at all surprising that they kept not using Git for a long time.

There's really no reason to be surprised at all about this unless you're the kind of person who never did any programming before, like, 2010 and lack the imagination or knowledge to understand how programming could be done without it.

Re:How Dwarf Fortress is built by wisemanwillhear on Thursday July 29, 2021 @02:16PM (#27999635)
I can't disagree with that. We must all make wise decisions with endless competing "priorities" and limited time.

As someone who is on the other side and believes in the value of continuously growing one's skills, I want to convince people that Git has value in learning and using. More tools in our toolbelt makes us more effective craftsmen. Which the DF developer did get around to doing...

Re:How Dwarf Fortress is built by godshatter on Thursday July 29, 2021 @03:00PM (#28000076)
I agree with this. I've been using cvs as my source control system of choice as a solo developer on my own projects for years and haven't switched to anything newer. I use git at work, but it's not worth the hassle for me at home. The workflow with cvs for me is basically "cvs update" (in case I need to know what changed) and "cvs commit". I rarely use branches. I religiously make one small-ish fix per commit and at least compile it, though I always run smaller things.

If I switched to working with a team I'd definitely use git. But for just me, cvs is all I really need. The most complicated thing I do is probably tag a release or revert to a previous revision of something, which is pretty rare.

Re:How Dwarf Fortress is built by darkarmani on Thursday July 29, 2021 @02:59PM (#28000058)
What? How it more difficult that CVS or even RCS that lies under CVS?

That would have been the OS tool back in 1998.

Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @04:17PM (#28000946)
For lone developers in 1998 it's more likely they would just occasionally make a copy of the code somewhere. That's still more or less how I work on my own stuff.