[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What's your git power-level? Also /r/-ing the deep

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 133
Thread images: 14

File: git-logo.jpg (19KB, 300x300px) Image search: [Google]
git-logo.jpg
19KB, 300x300px
What's your git power-level?

Also /r/-ing the deep sea picture for git.
>>
I use it every day, but my powers are limited. What are some Pro things I should know? Merging branches and fixing conflicts are probably the only non-noob stuff I do.
>>
>>59805089
>>59805114
Same. Please enlighten
>>
>>59805114
> Merging branches and fixing conflicts

I'm a noob and I know how to do that. Isn't it required to use it (unless you're working on a project by yourself)?
>>
>>59805158
Most of my merging is done through github enterprise UI, but anyway if merging is noob 101 that's fine, still looking for tips to up my git game.
>>
All I know is git clone
>>
>>59805089
Use it for work, uni, and personal stuff. I can do most of the major stuff since I've used it so much.
>>
Right click -> commit
Right click -> pull
Right click -> push

I'm glad my work place made it easy to use.
>>
im more of a clearcase man myself
>>
Of you can add, commit, merge, pull from different remotes, and know the basics of reverting commits, you pretty much have it all covered.
>>
Oh, and checking out branches.
>>
File: 1413202562602.webm (3MB, 1440x900px) Image search: [Google]
1413202562602.webm
3MB, 1440x900px
>>59805089
i know how to rebase
>>
>>59805089
git clone https://github.git
git commit . -m "insert comment here"
git push origin master
>>
>>59805985
>git commit . -m "insert comment here"
Won't do anything since you didn't add any changes
>git push origin master
Why specify the remote when you have only one?
>>
File: git.jpg (535KB, 1445x2048px) Image search: [Google]
git.jpg
535KB, 1445x2048px
>>59805089
>>59805089
>>59805156
>>
>>59806317
Screw you nerd!
>>
>>59805114
git rebase [-i]
git cherry-pick
git add -p
git reset (careful with this one)
>>
>not using cvs
>>
You should learn to rebase, and interactively rebase.
You should learn to split commits by adding only individual hunks.
You should learn to subscribe / un subscribe to remote repositories.
You should learn to stop using "git pull" to have control on how your shit's organized.
You should learn immediately about git reflog, which shall save your ass when something goes awry.
>>
http://learngitbranching.js.org/
>>
>>59805089
Git add .
Git commit -m "fucking kill me"
Git push origin master
>>
>>59805114
don't obsess over tools so much. if you don't know what "non-noob" stuff you should learn then you probably don't need them. focus on actual programming.
>>
>>59805089
git flow

For real companies that need to get things done.
>>
>>59805089
I use git bisect, so I consider myself a kind of git demigod.
>>
>>59806337
Are git branches really homeomorphic endofunctors mapping submanifolds of a hilbert space?
>>
>>59807345
No, a directed acyclic graph will suffice.
>>
>>59805089
squashing commits is probably the most complicated thing I do with it, so whatever that is.
>>
>>59807345
Of course not, it's just a five dimensional torus embedding.
>>
>>59805089
I've had a git forever b ut barely use it since it's horrible and filled with sjw fucks
>>
>>59807416
Ok, thanks, never used git! _( 9+,4-523-,/ :+1 -(4 !3*,9:24 -( 1+_"5 .*'2 42,42 (:*( -( -4 *, *9)9"-9 /3*@:
>>
>>59805089
i'm using mercurial
>>
>>59807508
How's life?
>>59805089
I've read the whole git manual and most of it is useless in everyday work. A solid understanding of `git rebase` gets you 99.9% of the way. Also `git reflog` if you've fucked up. `git worktree` if you ever need to have two trees checked out at the same time.
>>
>>59807345
Of course not, not even a metric space is useful.
>>
my favorite git checkout -orphan technique. makes my gazillion commits disappear and project sprung up instantly. :^)
>>
>>59808387
Just rebase -i --root master and squash.
>>
>>59806337
What level is
>having your whole company's code in a single 34 GB repo
>>
>>59808434
That's 34 GB per checkout btw.
>>
>>59808434
Looks like my previous job.
They previously used used a huge SVN repository and converted it to git.
Of course, with SVN you can just checkout a separate directory and organize it so that a directory equals to a project.
In git it is not the case.
>>
I'm the only person that uses git CLI instead of SourceTree at work.
>>
File: 1491034527753.jpg (46KB, 622x647px) Image search: [Google]
1491034527753.jpg
46KB, 622x647px
>>59808829
>not telling us the story of cli making you 470% more productive then those gui fags
>bitches don't know about my git command aliases
>>
>>59808829
I'm the only person that uses git svn at work.
>>
I'm too smart for using this bloated mess known as git
>>
>>59808889
SourceTree makes your pull take 10x longer than CLI if you use one or more submodules. That alone makes me more productive.
>>
>>59805089
IT'S OVER NINE THOUSAAAAAAAAAAAND
>>
what power level do I get for having dozens of files named like "new_", "newnew", "oldnew", "new1" etc. on my desktop?
>>
>>59809000
idiot level
>>
>>59808939
here we go...
also
>using submodules
>>
>>59808923
Me 2 m80. I use cvs. Shit is so light and useful. Why would anyone want branches lol?
>>
>>59809038
What's wrong with submodules?
>>
>>59806337
at what level having your own git aliases/commands fit in?
>>
>>59809070
It's literally impossible to do a shallow clone if there are submodules involved.
>>
>>59805089
I work with a literal full blown autist, who had never heard of version control until someone pointed it out to him a few years back and then he dug himself so deep into git material that he now tries to solve everything with it. He even wrote his own half-baked library that produces semi-valid git repos, which he then uses to archive pictures and pdf files (that never change), where any sane person would simply use zip or something.

He says he understands git completely, but he only understands the low level mechanics. He doesn't understand how to properly use it. Like a car mechanic who knows every part of a car, but couldn't drive a mile without crashing it into a tree.

I would say his powerlevel is insane, but then again, he can't control it at all, so what's the point.

I know enough to create, maintain and work with normal git repositories. Branching, merging, or rebasing, the standard stuff. Time spend learning to write better code is much more valuable than operating a fucking repo.
>>
>>59809610
Lol. Good analogy, because while he understands how git works he doesn't understand that using it with binary files is straight retarded.
>>
git commit-tree (>>59805089
git cat-file -p $1 | grep tree | cut -f1 -d" ") -p HEAD -m $2

thats prob the deepest i got
>>
bzr master race reporting in
>>
>>59809782
When asked why he didn't simply use a regular archive format, he answered that this added an extra layer of security. He believed that if "hackers" actually managed to get on our server, they'd be frightened away by weird looking git repositories.

When asked why he didn't use encrypted archives, he got irritated and rattled off some story about future plans he had which wouldn't work any other way. We still haven't figured out what those plans are.
>>
>git filter-branch
you're a true git master if you can fire up one of these bad boys without triple checking your command before sending it
>>
>>59808434
mentally challenged retard tier.
>>
>>59805089
server side post receive hooks to trigger ci stuff
>>
>>59808434
i know a software company that doesn't even use version control, they literally edit comments at the top of each file stating who modified it and when
>>
>>59810372
Tell that guy about git-annex and watch how euphoric he gets while reading its man pages.
>>
>>59805711
Is it that difficult to type those things into a terminal?
>>
>>59810791
Shortcuts (ga, gst, gc, etc.) and branch renaming are about as far as I go
>>
>>59810853
That actually looks interesting. I want to see how he responds, although he generally doesn't like any suggestions coming from colleagues, if he likes it he usually later returns with it as if it was his own idea (which he then really seems to believe).
>>
>>59807262
Git bisect is magic. For those moments you dont wanna dig through other people's code to find their bugs.
>>
>>59810815
Do the comments also contain the old unmodified code? Or do they just comment it out in place and write the new code? Because I could see this still funtioning just fine if done right.
>new comment at top of page describing which line(s) was changed, when, and by who
>jump to lines and see commented out old code
>determine if new code is better than the old code, or if another way is better

Though I guess determining what the new code is might be tough if it doesn't translate line to line from the old code.
>>
>>59811527
i guess the old code isn't commented out, tho they might have backups or something
i never worked with them, i only know someone who does

they only manage to make it work because they are small and there never are more than 4 people working on development
i really don't see any good reason for them not to use version control, the small time investment needed to maybe learn it and configure it on existing stuff would surely pay for itself but whatever
>>
I know repositories are graphs. Well everything in the world is a graph of some form so that's a cheap abstraction.

I just google whatever outside-the-norm thing I have to do.
>>
>>59805089
How advanced am I if I don't have any problems rebasing complex branches?
>>
>>59808434
How is it even possible to have 34 GB of text?
>>
>>59812380
probably some pajeets are regularly committing binary stuff
>>
>>59809610
It's not strange. Git is a content-addressable filesystem with a convenient source code version-control interface on top.

>>59809782
As far as I know, git with binary files is retarded because it's delta calculation program is designed for small files -- it will literally load their entire contents into memory before deltaing them

I really wish somebody would simply fix that already so we can move on from this meme.
>>
>>59812317
>Well everything in the world is a graph of some form so that's a cheap abstraction.
yeah, but they are directed graphs, which make the "parent" relationship easier to work with
>>
File: 364.png (6KB, 448x357px) Image search: [Google]
364.png
6KB, 448x357px
>>59805089
Bretty low :DDDD
We are using SVN.
>>
>>59807345
The submanifolds are significantly discrete objects, so a Hilbert space is a poor choice because analytic techniques are... unreliable between git branches.
>>
>>59812536
You can only easily go one way though, it's much more difficult to locate the descendants of a check-in than the parents.
>>
>>59805089
I can git push on a whiteboard.
>>
>>59812380
I've seen idiots who store dependencies/libraries in the repo with the reasoning that it works on any computer. Also, Images/videos/anything to do with graphics can eat up space quick
>>
>>59811472
holy shit this is a fantastic idea
>>
File: link19.png (188KB, 492x440px) Image search: [Google]
link19.png
188KB, 492x440px
Is there any cool git feature I should know about? All I usually do is rebase or cherry-pick from branches, stash shit, commit, and manage remote repos.
>>
>>59805089
I'm not even sure what it is.
>>
I usually use cli / JetBrain's git integration. For resetting /viewing diffs I use gitk.
>>
>>59805114

Last week I learned that the real deal is understanding and using all merge strategies.

If each of your programmers have their IDE's tab policy configured differently, and even worse, they auto correct all the files upon opening, merging is going to be a huge real mess.

Also, windows \r\n and Unix \n kills the man.
>>
My commit history is pretty sad. I don't know what I was wasting my time on last year
>>
>>59816028
>not using gitlab
>>
>>59805089
my git powerlevel is messing up merges of projects i'm working on by myself and fighting cryptic git error messages for 2 hours at a time until i just fucking throw my hands in the air in frustration and re-create the repo.
>>
>>59806397
>git rebase [-i]
never use this
>git cherry-pick
never use this but it s nice to have
>git add -p
never use this, the --patch part anyways
>git reset
Use this all the time
>>
If you don't rebase your feature branch off master before merging with it, you are the devil.
>>
I like git diff HEAD

Just to make sure Im not commiting something stupid.
>>
>>59805089
git push --force[/base]
>>
File: 1491712250585.png (56KB, 682x304px) Image search: [Google]
1491712250585.png
56KB, 682x304px
>>59805089
>>
File: magit.jpg (197KB, 1360x714px) Image search: [Google]
magit.jpg
197KB, 1360x714px
If you don't use Magit, you're not above intermediate level.
>>
>>59816369
what's so great about it?
>>
>>59816059
> gitlab
what is that
>>
>>59816695
>gitlab
>what is that
proof that devops is a bad idea
>>
>>59805089
is git gc worth it?
>>
i have a 100kb .xlsx Excel document that i want to keep track of, but since it's a binary the repo just balloons in size :/
>>
>>59815618

>>59807262
>>59811472
>>
>>59806337
more like this?
>>
I'd consider myself expert. Been using for 2 years professionally and a few years in school for various things

I'm rarely tripped up by anything these days and git flows out of my fingertips
>>
>>59805114
I know git-
. clone
. push
. pull
. add -m
. commit
. stash
I don't know much about the branching stuff, which is sad...
>>
anyone got a good blog writeup or something to show some examples of "master" functions? would be nice.
>>
>>59817308
Master functions?
>>
>>59817648
wizard functions
>>
File: 1369189402282.png (336KB, 1100x850px) Image search: [Google]
1369189402282.png
336KB, 1100x850px
>>59806337
That image is stoopid.
>>
>>59807262
Now that looks like some good shit
>>
>>59808434
our company has a single git repo for our config management with puppet, it's like 10MB, then run a script to setup of everything, it's pretty simple, except when the script fails to install shit for ruby
>>
you guys should check out tig, haven't used it much but it's convenient to visualize
>>
>>59819978
I manage a fairly large puppet environment. I'd strongly recommend using separate repos for each module.

Are you not even using r10k? How do you version your releases?

Ama if you need help/advice, people in my company have spoken at Puppet conf before.
>>
>>59820116
no no no, we use a single repo for all our puppet config management and each change is made on personal forks which are then reviewed before merging into the master puppet branch, from there it gets compiled and applied to the rest of the hosts

i don't know the innate details of the puppet setup so i'm not sure if we use r10k or not, i just know the way it's managed is alright and it's pretty convenient with hiera to setup new hosts

the only thing that's annoying is developing new modules and making sure none of the other modules conflict when we setup services

we actually have a resident puppet 'master' so to speak, he's great, but i try to not bug him to much, though there are some annoying things about our setup that makes it annoying to debug sometimes
>>
>>59807416
don't forget that it's a chained hash and that's why you can't fix your typo from a month ago without breaking everything for everyone.
>>
>>59811527
>if done right
You still need a system that prevents race conditions.
The more programmers you have, the less that system works. At the bare minimum, you need branches and merges.
>>
>>59812458
It's been fixed already, it is called git LFS.
>>
>>59805089
to be honest:
git pull
git add --all
git commit -m "did some shit"
git push origin master
>>
File: 1487043377001.gif (959KB, 480x270px) Image search: [Google]
1487043377001.gif
959KB, 480x270px
>>59809610
this post is fucking cancer. Look at your arrogance. You basically say "I'm better than someone who understands the low level mechanics because he struggles with working cohesively in a team." All you need to do is sit down with him and spend 15m explaining when to make and merge feature branches and he will be off to the races; meanwhile, he could probably try and explain the low-level mechanics to you for days and you still would not understand it like he does.

I have fucked up majorly with git ten or so times from not deeply understanding, though I get on fine day-to-day. Throw your arrogance to the curb.
>>
every time i have a branch i need to delete i type 'git branch help'

then i have two branches i need to delete
>>
>>59822561
i love you!
>>
>>59806337
>git daemon --reuseaddr --verbose --base-path=./.git
For what purpose?
>>
>>59809000
do you also give your variable names deliberately confusing names like 'int floaty' or 'double integers'?
>>
>>59805089
Yesterday I created my first git server. At first I thought I need to deploy Gitlab, but then I realized it shouldn't be so complicated.
Now I can't understand why there's a bunch of shit instead of my files, like HEAD, refs, origin, but push and clone from another PC work as expected.
>>
>>59822561
Top kek
>>
>>59806317
>>59805985
use git push --all
>>
git rebase -i
git checkout master
git merge --no-ff dev
git mergetool
git push
>>
File: Steam.jpg (9KB, 164x162px) Image search: [Google]
Steam.jpg
9KB, 164x162px
Can someone explain to me what rebasing does?

I almost lost a few days of work because I was fucking around with a rebase
Thank God for git reflog
>>
>>59807460

You are thinking of GitHub.

Git is just a software, originally created by Linus Torvalds.

GitHub uses git, but they did not invent the system.
>>
>>59807416
>acyclic
Not if you git gud enough
>>
>>59806337
> cherry-pick and gerrit is neckbeard-tier
How do I know, you have never worked with git?
>>
I fucking hate git.
>>
>>59817105
>I don't know much about the branching stuff, which is sad...
Branching is absolutely essential when working in a team, or on a large project.

Please look it up.
>>
>>59822551
>All you need to do is sit down with him and spend 15m explaining

Go fuck yourself. You don't know shit. This guy is the arrogance himself. He wouldn't take anyone's advice on git, no matter how much of a mess he created. He considers himself a fucking git-god and literally says he knows 99.9% of it. Which isn't true btw, but that's another matter.

You may want to defend you autist buddy, but this guy doesn't deserve any defending. He's a piece of shit and people warned me be before I started there, so he clearly already made a name for himself.

I wish he would take anyone's advice for once. Just fucking once.
>>
>>59807537
>git worktree
Didn't know. thx

>>59808434
>>having your whole company's code in a single 34 GB repo
A lot of big companies do that. ie M$ and Google

>>59809610
>Like a car mechanic who knows every part of a car, but couldn't drive a mile without crashing it into a tree.
I love the metaphor.

>>59815962
>Also, windows \r\n and Unix \n kills the man.
Git handles it without problems.

>>59820345
>why you can't fix your typo from a month ago without breaking everything for everyone
Because they can't rebase?

>>59822482
>git push origin master
git push -f origin master
FTFY

>>59825297
It try to apply the diff of a commit (or more) on another base.

>>59827746
Why are you in this thread. Please don't telle me that you're using something not in the trinity mercurial/darcs/git, because you would be ridiculous.


>tfw I have to use perforce at work, it's fucking retarded
>>
Bisect is fucking cool
>>
>>59805089

>create branch for long-running rewrite
>3 months pass, work is done
>need to merge upstream changes
>pull
>everything OUTSIDE the affected area is conflicted
>resolve with theirs
>push
>EVERYTHING IS ON THE CHANGELIST

but why?
Thread posts: 133
Thread images: 14


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.