Git

Rentlar , in Article argues that git is intrinsically confusing--if you could redesign git from scratch, what would you change?

I just need a GUI or some sort of visual reference. I have trouble picturing what exactly is going on with each variant of the command. I've been able to fuddle through it every time I do some programming, and when I used Android Studio there were some GUI tools to use but otherwise I always get so confused. I think using IDEs would help in other projects but that's a thing that keeps me from doing programming projects on the regular.

RonSijm ,
@RonSijm@programming.dev avatar
spartanatreyu ,
@spartanatreyu@programming.dev avatar

Nah, sourcetree has annoying bugs that never get fixed.

Use Fork, it's a better sourcetree.

It's free the same way that Sublime Text is: They'll ask for a payment once a month, but you can say you're "evaluating it" and use it for free. If you like it enough, you can pay for it. I have.

RonSijm ,
@RonSijm@programming.dev avatar

Cool thanks, I never heard of that one before, I'll try it out

Kissaki ,

I've been using TortoiseGit since the beginning. Nothing ever came close for me.

I in the log view I have overview, filters, and all actions at hand.

Maalus ,

I had to switch to linux sometimes and the horror of not having Tortoise there almost killed me

maegul ,
@maegul@lemmy.ml avatar

Yea my take with git for a while is that it is a naturally GUI oriented app/program much like text editors (who uses ed any more?), however much you’re a CLI only person.

zygo_histo_morpheus ,

I don't get that at all, to me using a GUI just gets in the way while on the CLI I can do whatever I want in a usually straightforward way.

maegul ,
@maegul@lemmy.ml avatar

Because it's for managing code, and the moment you get used to or want syntax highlighting and want to inspect or view diffs/patches, then you're in text-editor-like-GUI territory.

Beyond that, there's viewing and searching logs/history, viewing and managing branches and remotes and generally navigating the history of a repo. Graphical interfaces help with all of that.

A quick example that struck me was viewing the diff between two distant (ie, not adjacent) commits. With a decent GUI, it can be two clicks (with a modifier key). A really nice way of revising the history of a repo especially when there are multiple branches.

zygo_histo_morpheus ,

There are diff plugins that have syntax highlighting, I use delta for example.

For viewing and searching logs, I prefer the terminal because that's usually where I am anyway so alt-tabbing to a gui window means more context switching which isn't a big deal but is enough for me to want to stay in the terminal.

You can just diff two commits on the cli with git diff commit1 commit2 but I guess that what you mean is that you might not have any specific reference two either of the commits so you have to browse through the log to find the commit message that describes the commit, which I'll grant you is easier in a gui because you have two variables that you have to copy and paste if you're in the terminal.

maegul ,
@maegul@lemmy.ml avatar

You can just diff two commits on the cli with git diff commit1 commit2 but I guess that what you mean is that you might not have any specific reference two either of the commits so you have to browse through the log to find the commit message that describes the commit, which I’ll grant you is easier in a gui because you have two variables that you have to copy and paste if you’re in the terminal.

Yea, this is what I'm talking about. When all of the visual affordances coalesce into a pretty simple flow.

And to be clear, I'd suspect many like myself end up using both, where there'll always be some shortcoming in any given GUI that only the CLI can fill functionality/power wise. But defaulting to a GUI (or even a good TUI or editor plugin) for everyday usage, like I said, makes sense.

zygo_histo_morpheus ,

Like you say, there are always gonna be particular cases where gui/cli is better but for the general case I think it has to do with if your workflow is more terminal or gui oriented in general. I think that many of the tradeoffs in gui/cli git aren't really unique to git so I think sticking with your general preference in that are makes sense.

Since I'm a vim user (shocking, I know) I actually use git through the fugitive plugin a lot, but it's a fairly thin wrapper around the cli interface so most things are pretty much just the same as using the cli except that you can call them as vim commands instead (:Git push instead of git push and so on)

Corbin ,

The original workflow, which is still in use today, is git-blame followed by git-show: look up candidate commits, then examine their history individually. This can be accelerated with a GUI; e.g. GitHub and GitLab support blame-style views.

FizzyOrange ,

Do you ever use git log --graph ...?

zygo_histo_morpheus ,

Yeah, I mostly use plain git log but on occasion

onlinepersona , in Article argues that git is intrinsically confusing--if you could redesign git from scratch, what would you change?

Reference syntax. Like what the fuck is the difference between .. (2 dots) and ... (3 dots)? And is there .... (4 dots)?

And I can never keep apart how to compare references. If I want to compare my feature branch with master, is it git diff HEAD..master or git diff master..HEAD? It seems like in git the syntax is reversed to mine, but I'm never sure. Maybe something like git diff HEAD->master would be more intuitive?

And git rebase --onto. Fuck me did it take me a long time to understand that (if I understood it).

Honestly, that's just git CLI interface stuff. Every time I've tried to read about the internal workings of git, the naming has thrown me off and stopped me from continuing. Like what the fuck is "git porcelain"? IIRC there's also git plumbing? But that doesn't even seem to be the internals which have another bizarre name?

git is a large series of Chesterton's fences that should be each examined. I'm hopeful that somebody or some org will come around to design a version control system from the ground up with documented architecture from the start (and not written in gosh-darn C).

Anti Commercial-AI license

Corbin ,

I agree that the UX of existing git commands is not great. They evolved in a particular insular environment -- Linux kernel development with heavy mailing-list usage and large multi-headed merges, with occasional pull requests and manual integration testing.

Check out my top-level comment for a link to git's data model. A data-first approach with blob, tree, commit, and tag can be enlightening. The on-disk format tries to balance integrity, easy manipulation, disk space, and incremental updates; it's also weakly monoidal, enabling distributed development. Look up the history of Bitkeeper and git; this is "a version control system [designed] from the ground up with documented architecture from the start"! And there are many non-C implementations as a result, like pure-Python dulwich.

Corbin , in Article argues that git is intrinsically confusing--if you could redesign git from scratch, what would you change?

A PDF is available here, and analysis from Colyer 2016 is good.

This paper is fascinating in terms of ethnography. Consider: the paper mentions "branch" or "branches" dozens of times, but only says "tree" four times, and every instance is in the phrase "working tree". The paper never mentions "blob" or "blobs", "DAG" or "graph" or "poset". The authors either chose to omit git's data model, or they don't know about it. The implication is that the UX and UI don't reflect the data model, I suppose, but it is a very curious omission.

Now, contrast this with Git's documentation. When sysadmins teach git, we focus on the data first. git is a kind of database which stores four different flavors of object, and the git UI is merely a collection of commands for programmatically manipulating the database. All of the various UX is purpose-built, on a per-command basis, for development workflows. New commands can be implemented as plain UINX-style executable scripts in any language.

In summary, this paper looks at git as a version-control product, while its developers and users look at git as a version-control framework.

There was a followup paper from a few years later, also with Colyer 2016 analysis; this paper has too many glaring defects to discuss here.

On a personal note, I saw this and am happy to note that science has marched along:

We plan to extend our notation to make it more expressive in the future, but are cognizant of the fact that diagrammatic syntaxes for first order logic have a long and troubled history.

Not long after this paper, ontology logs were figured out, which can be made as expressive as needed for the case of relations; see Patterson 2017.

morphballganon , in Article argues that git is intrinsically confusing--if you could redesign git from scratch, what would you change?

There should be a download link for the latest release on a project's main page, so I don't have to click on the releases page if I just want the current version.

promitheas ,
@promitheas@iusearchlinux.fyi avatar

Thats github though, not git itself

morphballganon ,

Whoops, fair

promitheas ,
@promitheas@iusearchlinux.fyi avatar

No worries, fair mistake :)

abbadon420 , in Article argues that git is intrinsically confusing--if you could redesign git from scratch, what would you change?

Definitely something about merge and rebase.

csnetprogrammer ,
@csnetprogrammer@awscommunity.social avatar

@abbadon420 @testeronious Yes! There has to be something better than >>>> here and there and over there for merge conflicts.

Gobbel2000 , in Article argues that git is intrinsically confusing--if you could redesign git from scratch, what would you change?
@Gobbel2000@programming.dev avatar

I must say I like the idea of having changes to files be bound to just the current branch, not the entire worktree (section 6.4.2), but other than that the points that are brought up don't really seem too compelling. It certainly didn't convince me that git has an inherently flawed design.
For example, eliminating the staging area is a tempting point for simplifying git, but the authors already admit that it has some legitimate use cases.

But of course it is always nice to see some experimentation done in this space. I think the main reason why git sometimes is confusing, is because distributed version control really is a complex task, and git already does a very good job at making it tractable.

onlinepersona , in Is there a way to manage your presence over many forges?

Hey! Hope you had a good weekend.

You've run into the same issue I've ran into multiple times. Unfortunately, I don't have a solution, but there is hope that forgefed being implemented into forgejo will enable federation of issues, pull requests, and other management artifacts of sourceforges.
Until such time, maybe somebody might write (or has already written) something that syncs them across.

Cheers

Anti Commercial-AI license

haui_lemmy OP ,
@haui_lemmy@lemmy.giftedmc.com avatar

Thanks for chiming in! Just made a repo on my personal forge for a client to take care of this. Will start with a cli version but gui is possible.

Kissaki , in Is there a way to manage your presence over many forges?

No, there is not.

Mirroring git repos themselves can work with automation. Anything beyond that has serious drawbacks or complexity or won't work.

As for your key auth (git client auth), one key for authentication is sufficient to use across all platforms.

haui_lemmy OP ,
@haui_lemmy@lemmy.giftedmc.com avatar

Okay! Thanks! :)

superterran , in Best GitHub Alternative?
@superterran@lemmy.world avatar

Sounds like it’s time to get a bitbucket account

shockwave ,

God, I hope that you're being sarcastic.

superterran ,
@superterran@lemmy.world avatar

It’s not my first choice either, but something tells me it’s preferable to sourceforge

CeeBee ,

Printing everything out at the end of each day is preferable to sourceforge

embed_me , in Oh My Git! An open source game about learning Git
@embed_me@programming.dev avatar

Any alternate method to get the game? Itch.io downloads don't work on a slow connection like mine.

LiveLM ,

Try using a download manager, it's handles downloads on slow connections so much better than browsers do.
My favorite one is Jdownloader2

embed_me ,
@embed_me@programming.dev avatar

Upon further inspection, I found it's some DNS resolution error on that specific URL. It could be a stray hit caught in the censorship.

Ephera , in Oh My Git! An open source game about learning Git

Can recommend. Learned something from it, even with multiple years of Git experience under my belt. We've been handing it out to people new in our team for the past two years, and I feel like it helped quite a bit.
It can be worked through in about 4–8 hours, I'd say, obviously depending on your previous experience.

Bread , in Oh My Git! An open source game about learning Git

That's pretty neat. Fun is a great way to learn new things.

breadsmasher , in 10 Years of Git: An Interview with Git Creator Linus Torvalds [2015]
@breadsmasher@lemmy.world avatar

Linus Torvalds, the creator of Linux, took the challenge into his own hands and disappeared over the weekend to emerge the following week with Git.

Absolute madman. Need to invent a brand new version control system? “Ill just do it over the weekend”

cyborganism ,

Like a god damn software Jesus

technom ,

That was only a very rough version. His original plan was to use it as a backend for other VCS. Torvalds handed over the maintainership of the project to Junio Hamano after about 4 months. Much of what we know today as git are contributions from him and others.

None of this is to say that Torvalds didn't invent it. He invented the content addressed object storage format. But it's important to understand the actual history of git's evolution.

nieceandtows , in 10 Years of Git: An Interview with Git Creator Linus Torvalds [2015]

Wow, I had no idea. What else has this man created?

technom ,

The story behind git is very dramatic. You should read it.

Zink , in 10 Years of Git: An Interview with Git Creator Linus Torvalds [2015]

Aha! He wrote git!

I KNEW I saw that name somewhere before.

cyborganism ,

What? Linus Torvalds? Your mean the guy who wrote the Linux kernel?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • git@programming.dev
  • test
  • worldmews
  • mews
  • All magazines