r/git • • 20h ago

support Committed a secrets file in my first internship week and realized I know about 6 git commands

26 Upvotes

first week of my internship and i committed an env file with sandbox keys to our team repo. nobody panicked, my mentor walked me through rotating them and rewriting the history, but watching him i realized i know maybe 6 git commands and understand none of them. my team will reimburse a course and theres 10 weeks left here. what would you have an intern learn first so they stop being scared of git??


r/git • • 39m ago

tutorial Two Developers OneLine GitMerge Conflict

1 Upvotes

What happens when two developers working on the same branch modify the exact same line of code differently?

Git can't automatically decide which change to keep, and that's where a merge conflict happens.

I made a short visual explanation of this using the multiverse chaos of Avengers: Doomsday.

A simple Git concept explained through a fun tech analogy.

Video: https://youtu.be/QCf2AztQOvU?si=ulEjPiaZsUNLhSYi


r/git • • 2h ago

Introducing ForkPlus --- Fork-like Git GUI and Free

Thumbnail gallery
0 Upvotes

I'm not affiliated with ForkPlus or its developer, and this is not a sponsored post. Just want to share

I have struggled between Git GUI for long time, one is Fork and the other is SourceGit. Fork is more sophisticated and intuitive and it performs better (or best?) in edge and heavy cases. But it is not open-source, no Chinese (my mother tongue) and paid software though Dan told me "Hi,

  1. As a student you can use Fork for free
  2. There is an already discounted price for China
  3. We never have discounts
  4. 2 people is cheap. We will release a paid update one day, but currently we didn't have a time for that. It will be kind of '5 years of updates'."

But I still want to pay for it because developers have to make a living. If I were a developer, I'd definitely want users to pay for my software too. And I think the couple also want me to pay for Fork. And Fork does not force users to pay, only pops up sometime, which makes me appreciate. But to be honest I am a newbie so I have not encountered the edge and heavy cases until now so Fork has almost no difference for me. But of course, Fork is maturer and a native app. Native desktop apps seem less common nowadays, perhaps because Electron apps are easier and more cost and time-effective to develop. For me, Fork would be almost perfect if it supported Chinese. The only difference I can notice is that the colorful graph of Git history is intuitive and better than SourceGit. But to be honest that I can read and type the Git professional term quick because it is short and intuitive but the Fork GUI's settings I cannot because the words are difficult for me

The SourceGit, however, almost in the opposite. Open-source, free and Chinese and to be honest, I do not care the graph of Git history very much

So I use both on my computer and I have not pay for Fork

Then, about a week ago, I discovered ForkPlus. So far, it seems to check all the boxes for me: a Fork-like interface, Chinese localization, an open-source license, and no purchase cost

PLUS: To be honest, if Fork supported Chinese, I'd definitely buy a license to support the couple

If Fork was open-source it was more convenient to support i18n and l10n because the community can add more language


r/git • • 11h ago

Limpar objetos desnecessários do Git

0 Upvotes

Como evitar que o diretório de um projeto aumente de tamanho progressivamente após executar git pull?

Tamanho da pasta: 1,8 G

$ du -sh ~/void-packages

1,8G /home/tux/void-packages

$ cd ~/void-packages

$ git gc --prune=now

Enumerando objetos: 1280134, concluído.

Contando objetos: 100% (1280134/1280134), concluído.

Compressão delta usando até 4 threads

Comprimindo objetos: 100% (397670/397670), concluído.

Escrevendo objetos: 100% (1280134/1280134), concluído.

Total 1280134 (delta 732231), reutilizados 1277709 (delta 729810), pack reutilizados 0 (de 0)

Expandindo commits alcançáveis no commit graph: 227298, concluído.

Escrevendo o commit graph em 4 passagens: 100% (909192/909192), concluído.

$ git count-objects -vH

count: 0

size: 0 byte

in-pack: 1280134

packs: 1

size-pack: 601.29 MiB

prune-packable: 0

garbage: 0

size-garbage: 0 byte

$ git pull

Já está atualizado.

$ du -sh ~/void-packages

1,8G /home/tux/void-packages

$ git maintenance run

Nada novo para empacotar.

Na pasta ~/void-packages/srcpkgs/ só tem arquivos de texto.