Git

DoubleEndedIterator , in What's the worst commit message you have ever seen?

Small Fixes

Added 1800 new lines...

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

mryessir , in Branching and Merging question

A merge request isn't a git thing; It is an extension of some platforms.
If you continue developing on the same branch as the mergerequest was issued for, github and gitlab will list your commits within the Merge Request once you have pushed them to your remote.

If you do not want this, you can simply branch off after issuing your merge request.

larida OP ,

ok, so a "merge request" can be viewed as "merge of branch1 into master will happen at a time I cannot control".

Now, branch1 is checked out, if I do git switch -c branch2, it will start a new branch2 based on the last commit from branch1, right? I feel it's safer, since I don't know when branch1 will merge, server-side.

mryessir ,

Exactly.

Depending on the upstream guidelines (check for a CONTRIBUTION file) you may open a MR with your initial development efforts. And reuse the branch until you have finished the feature. Then you request a review.

Or you may first mention your branch on a issue and only create the merge request once the entire feature is developed.

If you are developing another feature, use a dedicated branch.

In any case, the author merging may elect only specific portions of your change.

Also note that it is perfectly normal that a merge request will be open for months. So don't be discouraged. There may already be people profiting from your change. You just don't see it.

JoYo , in Every git command I use (Cheatsheet)
@JoYo@lemmy.ml avatar

before every git command i use:

tar -czvf my_directory.tar.gz -C my_directory .

pineapplelover , in When do people prefer merge versus rebase?

Man, these git commands. I don't think I will ever master them.

silas ,
@silas@programming.dev avatar

Yeah it's rough. I'm having a hard time staying committed.

Hexarei , in GitUI: Blazing fast terminal-ui for git written in rust
@Hexarei@programming.dev avatar

For a super long time, I was a CLI-purist when it came to git, and I still maintain that anyone who knows how to use git should be able to do anything via the CLI entirely.

However, over the past few months I have used gitui through vim-floaterm, with it setup to auto-launch as the floating terminal opens. Super useful to just hit a hotkey while in nvim and bash out a super quick commit/push with just a couple keystrokes.

colorado , in GitUI: Blazing fast terminal-ui for git written in rust

Was surprised to see the repo was 60 MB but looks like it is because of the screen cast gif

mrkite , in GitUI: Blazing fast terminal-ui for git written in rust
@mrkite@programming.dev avatar

I prefer using the command line.. but it is nice to be able to use a TUI to select the staging files, so this works out perfectly.

davawen , in Using Git offline

That's hacky in a way I love, but since you're on the same network by design, why not just expose a remote on a machine that all other machines will use?

shnizmuffin , in git-bug: Distributed, offline-first bug tracker embedded in git, with bridges
@shnizmuffin@lemmy.inbutts.lol avatar

Has anyone used this? It's extremely interesting.

christophski , in Git Notes: git's coolest, most unloved­ feature

Is anyone here using these? If so, what for?

goku12 ,
@goku12@fosstodon.org avatar

@christophski I used to use it some time ago. It was to store cryptographically verifiable timestamps of the commits. Git has native support for cryptographically verifiable proof of authorship (using GPG and SSH keys), but not for timestamps. I used FreeTSA (https://freetsa.org/index_en.php) for this.

match , in [Julia Evans] Orphan Commits
@match@pawb.social avatar

why do I care about orphans? fuck them orphans. I'm the one who made them orphans anyways

UFODivebomb , in [Julia Evans] Orphan Commits

Who hasn't frantically scrolled back in their terminal to find an orphan id.

zygo_histo_morpheus ,

You should check out git reflog if you don't know about it already. It allows you to view the history of commit changes which is very handy if you want to undo an --amend or rebase for example

robinm , in [Julia Evans] Orphan Commits

That's a really good explanation. I would just add that I find easier to search for orphans with git log --graph --reflog than using `git reflog directly, especially if it's one of the top entries in the reflog.

muhanga , in Moving Code from One Repository to Another Using Git Patch

This is a good example of what understanding your tools can give you.
Answer is new or novel approaches to the old problems.
Ability to create a patch from any diff is really really usefull.
If you have wip changes, but don't want to commit it to, then creating a patch is a quite easy way to go.

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