How the fuck did you learn how to use git Jow Forums?

How the fuck did you learn how to use git Jow Forums?

Attached: Git-Logo-1788C.png (910x380, 6K)

Other urls found in this thread:

amazon.fr/Git-Pocket-Guide-Richard-Silverman/dp/1449325866/
git-scm.com/book/en/v2
webfx.com/blog/web-design/interactive-git-tutorials/
gitcuck.biz/user/fossporno
youtube.com/watch?v=NDP91RNgT4A
youtube.com/watch?v=SWYqp7iY_Tc
twitter.com/NSFWRedditImage

git gud

by using it, but using it requires that you actually program.

trial and error, the most fun way

Picrelated

Attached: serveimage (3).png (700x440, 73K)

By googling when I was trying to do something I didn't know how to do?

if you're not messing with branching and merging, you need these commands:
git status
git add file
git commit file
git push
git checkout -- file
git pull

by using it you goddamn nigger.

amazon.fr/Git-Pocket-Guide-Richard-Silverman/dp/1449325866/

fpbp came here to say this

These plus branch and merge are 98% of what you need. Most likely you'll never have to use a weird command.

Also git reset --hard for when you fuck up and want to delete all your uncommitted changes.

I just copy paste from instructions

by using it

Just print out or save a PDF cheatsheet with a list of commands with desc.

Read this: git-scm.com/book/en/v2

this will teach you how git ACTUALLY works. Things like at fast forwarding, merging, reset, checkout, rebasing, tags and branches etc..
It will teach you what those really are and what they actually do. Git actually works differently under the hood from one would intuitively think. It's absolutely worth learning how it works.

this. i'd recommend using those and once you get used to them and what they do, branching and merging gets a lot easier to grasp

The basics are simple enough.
Soon you will mess up. You will try to fix it and mess up even more. After a few iterations with lots of googling you will get the hang of cleaning up your mess.

I just click this up arow icon in my IDE and it werks

>git commit file
I fucked up

git commit -m "message here"

>not using your $EDITOR to write the message

only correct answer
rtfm in a few weeks everyone at work will ask you how you learned git so well

It's sad how many people don't know that $EDITOR is a thing

git status
git add .
git commit -m "fuck niggers"
profits

Honestly by pair programming with people who knew it.

you must also learn /i/ and /t/

Why haven't they implemented the command
git gud
to open a Git tutorial?

at what size should i start using git? my programs are small and im a single developer

Took a course

Just use it via Magit vim/emacs extension.

Understanding the Git object model does absolutely nothing to help you remember which commands do what, along with their 11 bajillion options and flags that largely overlap. The git porcelain is just a dog's breakfast. Productive developers don't bother learning it and just use the VS Code extension or magit.

Just started using it. First few hours/days are hard but its getting easier and easier

this is the best "learn it the hard way" guide:

shafiul.github io/gitbook/1_the_git_object_model.html

everything about git can be inferred after understanding that first page. The guide goes on to explain everything, if you need that

This is good, used number 3 so far: webfx.com/blog/web-design/interactive-git-tutorials/

I am not an advanged user yet lol, just use commit, push, stage/unstage yet, but that is enough to do professional software dev work kappa kek lol :D

Do you have a "learn it the easy way" guide? :3c

So what are you using now? I use git for my own projects. Helps me remember what changes were for, easily see changes and revert them. Updating a file saving and changing to project_old.py or whatever is just pathetic with how easy git is.

Also, I just use Git via vscode and it just works.

i just synch the files automatically at 1am. old files are moved to a backup folder

Yikes. If not for nothing, just try it. It'll be a skill you can use elsewhere if needed.

curl cheat.sh/git

Just use it.

git clone gitcuck.biz/user/fossporno
git add .
git commit -m "add big ol schlongs"
git push

git add --all
git commit -m "dis a comment"
git push origin --all
git pull
git merge
git reset --hard HEAD~1
git pull -f
rm -r /git
git init
git add *
git commit -m "come on"
git push -f origin master
quit
:quit
::quit
Ctrl+F4

The only command string you'll ever need.

>How the fuck did you learn how to use git Jow Forums?
By learning it at a hackathon along with a cute-as-fuck little asian.
>git checkout -b featureYoureWorkingOn
>do work
>If new files, $git add fileOne fileTwo folderOne/ folderTwo
>$git commit -am "descriptive feature name"
>$git checkout master
>$git pull
>$git checkout featureYoureWorkingOn
>$git merge master
>Fix merge conflicts, you pleb.
>$git commit -am "fixed merge conflict" (if you actually did)
>$git push -u origin featureYoureWorkingOn
Then have someone else merge in your branch UNLESS you all explicitly trust eachother, OR you're the only one working on the project.

>quit
>:quit
>::quit
>Ctrl+F4
>Alt+F4
>Ctrl+Break
>Power Button
>Help let me out

writing stuff and putting it on my github
so at this point i just knew git clone/add/pull/push/commit
then i got a job and started to encounter things i hadnt needed before, like branching, rebasing, blaming, and when i fuck things up really bad, checkout old versions, reset, and revert

Regardless of what you learn from, I'd advice against gui clients
They're slower and you won't really understand how to use the command line utilities

Git integration for GUI-based IDEs? Pretty good, sometimes great. Independent GUI's for GIT management? Fucking terrible. I'm not sure how they managed to fuck it up so badly, but they sure did.

This seems to me kinda like suggesting that you learn vanilla JavaScript before learning libraries. AKA, really good advice.

this

Create a GitHub account and start a repository, really all there is to it?

Usually you just push and forget, and most of the time you already have a console open anyway, so yeah, I agree with that.
Fuck diff'ing on the console though

I didn't. Just use vscode+github/gitlab. Then you don't have to deal with linus' retarded command verbs. Seriously, git's architecture is brilliant but the commands are utter trash.

You don't need to know in detail how git stores everything low-level, but you need to understand what commits, branches, HEAD, and tags are. You need to understand how reset and checkout interact with tags. You need to understand the difference between the index, working directory and commit pointed to by HEAD.

If you don't, you're doomed to just throw around random git commands you copied from somewhere that you don't really understand at all and that may delete your changes. The moment you copy your git directory before doing something is the moment you admit you have no idea what the fuck you're doing. Sure, git is just committing, reverting, pushing and ammending most of the time and that can easily be done by a GUI, but when things get more complicated and they will, you will be grateful you took the time to learn it.

For learning maybe. But for daily use, there's no point in using the console. It's slow as shit to type the same commands and parameters every time you want to make a commit. You won't be learning anything new after doing the same shit everyday.

kek

> I can't figure out how to use the version control system that is literally named 'git' because it's simple enough a retard can use it
this is what happens when people like Torvalds bend over for SJWs. Lowest common denominator gets lower and lower as we all get forced to cater to those fucks

git branch -D yourself.

by practicing instead of eating my own shit everyday like you most likely do with these low effort retarded threads...

>was confused by git
>read the fucking manual
>comfortably use git
If only that pattern worked for the rest of computer shit, oh wait

For me that would be the most useful command

> :3c
no

I didn't, I just use like 4 commands copied from StackOverflow
I don't really know how to program either, but permuting StackOverflow answers seems to be sufficient to get a job as a software engineer, so whatever

git is great and works well until you have a conflict and it all goes to shit

at my old job, the senior dev made a big deal about me needing to know git. when I was working there, I kept my own branch and utilized submodules for open source code we used. He couldn't figure out how any of those features worked. I literally had to show him how to do anything related to branches and submodules over and over again

Fuck you for calling me out like this

>Productive developers don't bother learning it and just use the VS Code extension or magit.
Magit is not just another git GUI, Magit is a more powerful management interface than the git command line. I really wish someone would port Magit to VS Code as it would turn thousands of programmers into git power users over night.
youtube.com/watch?v=NDP91RNgT4A

Reading the man page like an adult

>mac
do you suck cock

git checkout -b nigger
vim nigger
i
nigger
esc
:wq
git add -A
git commit -m "nigger"
git push origin nigger

>group project
>get starter code
>it's a mess of java spring boot and react js
>everyone starts branching
>realise the master branch had about 80mb of node modules and java binaries
>everyone's already working on their branches
>some fag branches off some other fag's branch
>they wait until the deadline to push their huge conflicting changes
while it sounds like an absolute nightmare, it wasn't too hard to use git mergetool to resolve conflict and to rewrite the git history to completely remove the binaries. so yeah the basic commands can get you a long way, but merging, rewriting and gitignore are super useful too

git status
git diff
git show
git log
are also very useful. the serenity os guy gave some advice about making atomic commits which really clicked for me. it's much nicer to have small changes with descriptive commit messages.
so check your changes before you niggerliciously push them

git bisect is also good for finding bugs

nice, thanks

git blame
git merge
git log --oneline --decorate

Is there an easy way to turn a lot of changes of a single file into smaller commits? I use git only for some personal projects and sometimes find myself changing a bunch of things only to realize it'd be a poor idea to commit them all at once.

One word i wish I knew when I started with git: submodules.

>if you're not messing with branching and merging
so, if you're using git but not getting any real benefit from it so that one day you end up fucking yourself right up your own ass with a rake?

alias gitgud='git push -u origin master'

git add -p

yeah, only commit tested working code. i also saw a cool talk a while back about Spotify or some app company, and they said that their strategy is like this:

always commit to master
branch when release

this requires discipline in that you never EVER commit broken or untested code to master, but it allows you to release a new version at the drop of a hat

just start committing more frequently

Now you only remember the alias but not the real commands.

This just looks like a workflow to avoid code reviews. If multiple programmers are working on different branches, how can you be sure the their respective changes don't break each other's changes after being committed to master?

$ man 7 gittutorial
$ man 7 gittutorial-2

Attached: download (3).jpg (480x360, 19K)

git dev here, here you go:
$ cat

>cat

why would I ever need to know the real commands when I can just pull my config files?

put
[alias]
gud = push -u origin master

in your ~/.config/git/config

git add -p looks pretty good, but another solution would be using inotify or entr to listen to the directory and commit every time something changes. and then i think git rebase to combine commits.

do you even have to ask?

If you're actually having trouble with git, don't be afraid to use a gui of some kind. It'll make some things like which files are committed of staged easier to manage

in college I forced myself to use it for all projects, and saw it was really convenient

Just a crash course on youtube
youtube.com/watch?v=SWYqp7iY_Tc

If I need more than this Ill look it up but right now I haven't

I never learned to use branching or merging or any of that. Making 85k kek

Post feet.

So continuous integration?

>windows
stopped watching right there

Why?

there's this meme that works like this
>x
stopped y'ing right there
lurk moar

So there's no reason?