Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on cafe.coffee-break.cc

11 replies

feddit.org

It is wrong. Git does not need a central system (although most people define one as the central). The local system has a repository, too.

Commits go into the local repository, not outside.

Push goes from the local repository (not from a commit that's hanging in the air) to a remote repository (most times to the "central" one).

There are pretty good tutorials on youtube. Just be sure to learn git itself first, and then all the website things like github etc.

15

Though you can also have multiple remotes each containing a subset or superset of your current branches and commits. Which is fun.

3
lemmy.world

Basic workflow that got me through the learning pains.

If I just sat down:

  • git checkout develop or whatever ur main branch is
  • git pull origin

If I'm working on a new branch:

(If not already on the new branch)

  • git branch -b feature/123-ticket-name

(After making some changes)

  • git add .
  • git commit
  • git push

Git will prompt you the first time you git push, just follow the instructions.

And of course there's tons more you could learn or dive into. But that should give you a stable foundation to start working from

4

You'd be surprised how many people use git without knowing even the basics.

I've had a surpising amount of coworkers who have come to me for an issue that I literally googled for them to just give them the answer.

3

I've tried learning git a few times and new a bit about it but this article helped me understanding it quite a bit better:

https://www.chrismccole.com/blog/git-for-artists

The practical bits are about Github which you obviously don't want to use but you can still get the gist of it when using Codeberg or something similar.

2

There are many many many many many git tutorials online. You literally need to stick the question into a search engine or watch a YouTube video.

2

You reached the end

How to step into the world of git ? | Spyke