Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


we're gonna migrate from svn to git because that's the new company "standard" so I'm looking forward to all the exciting fuckups that can bring us

i think we're using gitlab but there is zero consistent information on what the new "standard" actually means and everyone I ask just goes "oh I wrote a wiki page on how we did it" and that's full of poo poo like "type this command in and run it 5 times until it works then install python and run this script"

still, could be worse, some teams are still on clearcase and the idea of merges is alien to half of them

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

Powerful Two-Hander posted:

we're gonna migrate from svn to git because that's the new company "standard" so I'm looking forward to all the exciting fuckups that can bring us

i think we're using gitlab but there is zero consistent information on what the new "standard" actually means and everyone I ask just goes "oh I wrote a wiki page on how we did it" and that's full of poo poo like "type this command in and run it 5 times until it works then install python and run this script"

still, could be worse, some teams are still on clearcase and the idea of merges is alien to half of them

Here are all the commands you need:

git clone ${URL} (Clone a repo)
git clone ${URL} -b ${branch} (Clone a repo and checkout a branch)
git checkout ${branch} (Make a new branch)
git checkout -b ${branch} (Checkout an existing branch)
git branch -a (See all existing branches)
git diff (See what the gently caress you did to everything before committing it)
git diff --name-only (Show a list of files you changed [Don't actually show the changes though])
git diff /path/to/file (See what the gently caress you did to a file before committing it)
git add /path/to/file (Add a file to be committed)
git add -A /path/to/directory (Add a directory to be committed)
git commit (Write a commit message about what the gently caress you did)
git push origin/${branch} (Push those files to your branch)

That's like... 99% of everything you need. If you want to get real fancy:
git tag -a ${TAGNAME} -m "${TAG MESSAGE}" (Mark this commit as a tag)
git push origin ${TAGNAME} (Push the tag name to origin)
git tag -l (List all tags)


Or use the github desktop app because it's really really good (it works with any git server.)
Or if you use an IntelliJ IDE, it already has git integration, or if you want, there is a great extension called
gitlab projects that I use.
It supports Checkout/Share/Merge Request and Merge Request list dialogs.

FlapYoJacks fucked around with this message at 14:10 on Dec 19, 2017

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

ratbert90 posted:

Here are all the commands you need:

git clone ${URL} (Clone a repo)
git clone ${URL} -b ${branch} (Clone a repo and checkout a branch)
git checkout ${branch} (Make a new branch)
git checkout -b ${branch} (Checkout an existing branch)
git branch -a (See all existing branches)
git diff (See what the gently caress you did to everything before committing it)
git diff --name-only (Show a list of files you changed [Don't actually show the changes though])
git diff /path/to/file (See what the gently caress you did to a file before committing it)
git add /path/to/file (Add a file to be committed)
git add -A /path/to/directory (Add a directory to be committed)
git commit (Write a commit message about what the gently caress you did)
git push origin/${branch} (Push those files to your branch)

That's like... 99% of everything you need. If you want to get real fancy:
git tag -a ${TAGNAME} -m "${TAG MESSAGE}" (Mark this commit as a tag)
git push origin ${TAGNAME} (Push the tag name to origin)
git tag -l (List all tags)


Or use the github desktop app because it's really really good (it works with any git server.)

nothing about merging or rebasing huh. this is a list of "best meals in the city (for one)"

FlapYoJacks
Feb 12, 2009

Phobeste posted:

nothing about merging or rebasing huh. this is a list of "best meals in the city (for one)"

Just lol if you use the CLI to merge. Fuuuuuck that. I mean, I love the CLI, don't get me wrong, but some things are just nicer
through a GUI.

For merge requests I tend to:

- git checkout -b ${NEW_BRANCH}
- do some lovely work
- diff/add/write lovely commit message/git push
- Go to the web interface
- Create merge request.

If I remember I have the gitlab extension in CLion I use that to make a merge request. :v:

FlapYoJacks fucked around with this message at 14:12 on Dec 19, 2017

MononcQc
May 29, 2007

The git paradox is that it's fine at basic poo poo (which everyone advises you limit yourself to), but the reason people sell it as a great thing is all the features you should not use like git add -i or git rebase -i.

If you're limiting yourself to basic poo poo, it may be a better idea to use a tool that does the basic poo poo better.

Sapozhnik
Jan 2, 2005

Nap Ghost
mods please rename this thread to "gitposting itt"

Workaday Wizard
Oct 23, 2009

by Pragmatica
from the coding horrors thread:

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Sapozhnik posted:

mods please rename this thread to "gitposting itt"

born to merge
conflict is a gently caress
pull em all 1989
I am Git man
410,757,864,530 squashed commits

Arcsech
Aug 5, 2008

anthonypants posted:

it sounds like your product doesn't support contemporary versions of the databases/runtimes/etc that your customers could find in the redhat or centos repositories for their operation system

nah, we always keep up to whatever the current long term support version is

if you let users install their own they will endlessly bitch about having to upgrade from their custom build of the jre from 2005 and now you're stuck on java 1.5 forever

Toady
Jan 12, 2009

ratbert90 posted:

git checkout ${branch} (Make a new branch)
git checkout -b ${branch} (Checkout an existing branch)

the descriptions are flipped, but it's understandable because using checkout -b to make a new branch isn't intuitive anyway

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
implement your own git client with git plumbing imo

Eleeleth
Jun 21, 2009

Damn, that is one suave eel.

bob dobbs is dead posted:

implement your own git client with git plumbing imo

This is the "I hate git, but I hate myself even more" response.

Notorious b.s.d.
Jan 25, 2003

by Reene

bob dobbs is dead posted:

implement your own git client with git plumbing imo

it would be funny to re-implement hg on top of git, sell it as a new improved git cli, and see how many people bite

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

ratbert90 posted:

Here are all the commands you need:

git clone ${URL} (Clone a repo)
git clone ${URL} -b ${branch} (Clone a repo and checkout a branch)
git checkout ${branch} (Make a new branch)
git checkout -b ${branch} (Checkout an existing branch)
git branch -a (See all existing branches)
git diff (See what the gently caress you did to everything before committing it)
git diff --name-only (Show a list of files you changed [Don't actually show the changes though])
git diff /path/to/file (See what the gently caress you did to a file before committing it)
git add /path/to/file (Add a file to be committed)
git add -A /path/to/directory (Add a directory to be committed)
git commit (Write a commit message about what the gently caress you did)
git push origin/${branch} (Push those files to your branch)

That's like... 99% of everything you need. If you want to get real fancy:
git tag -a ${TAGNAME} -m "${TAG MESSAGE}" (Mark this commit as a tag)
git push origin ${TAGNAME} (Push the tag name to origin)
git tag -l (List all tags)


Or use the github desktop app because it's really really good (it works with any git server.)
Or if you use an IntelliJ IDE, it already has git integration, or if you want, there is a great extension called
gitlab projects that I use.
It supports Checkout/Share/Merge Request and Merge Request list dialogs.
where's the post that tells you how branches are supposed to be used or what rebasing means

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

MononcQc posted:

The git paradox is that it's fine at basic poo poo (which everyone advises you limit yourself to), but the reason people sell it as a great thing is all the features you should not use like git add -i or git rebase -i.

If you're limiting yourself to basic poo poo, it may be a better idea to use a tool that does the basic poo poo better.

i once used an obscure git command to nuke all evidence that certain file ever existed in the repository (it had api keys in it). it worked perfectly and took 10 minutes

i tried to do this again a few years later, and spent hours fighting with git and messing up my repository. i eventually said fuckit, deleted my local copy, and restored from my remote backup

redleader
Aug 18, 2005

Engage according to operational parameters

anthonypants posted:

where's the post that tells you how branches are supposed to be used or what rebasing means

also the "undo this change" commands

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Lutha Mahtin posted:

i once used an obscure git command to nuke all evidence that certain file ever existed in the repository (it had api keys in it). it worked perfectly and took 10 minutes

i tried to do this again a few years later, and spent hours fighting with git and messing up my repository. i eventually said fuckit, deleted my local copy, and restored from my remote backup

you're probably just going senile. try to get into management asap

JawnV6
Jul 4, 2004

So hot ...

anthonypants posted:

where's the post that tells you how branches are supposed to be used or what rebasing means
https://www.atlassian.com/git/tutorials/comparing-workflows

Xarn
Jun 26, 2015
git rebase -i and git add -p are both great :v:

Glorgnole
Oct 23, 2012

today in old commit messages
code:
Revert "Revert "WOOOOOOOOOOOO ARM WORKS (KINDA)"" 

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
so i gotta migrate a very pos python AWS lambda off of AWS by feb 1

is just shoving it into a GCP cloud func a good idea

e: lol GCP can't do python
hooboy

brap
Aug 23, 2004

Grimey Drawer

Powerful Two-Hander posted:

born to merge
conflict is a gently caress
pull em all 1989
I am Git man
410,757,864,530 squashed commits

what’s the reference?

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

brap posted:

what’s the reference?

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Sapozhnik posted:

BORN TO ROLLBACK
SCHEMA IS A gently caress
(+) Join Em All SQL:2003
I am query planner
410,757,864,520 AFFECTED ROWS

theodop
Dec 30, 2005

rock solid, heart touching

Sapozhnik posted:

BORN TO ROLLBACK
SCHEMA IS A gently caress
(+) Join Em All SQL:2003
I am query planner
410,757,864,520 AFFECTED ROWS

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Sapozhnik posted:

BORN TO ROLLBACK
SCHEMA IS A gently caress
(+) Join Em All SQL:2003
I am query planner
410,757,864,520 AFFECTED ROWS

cinci zoo sniper
Mar 15, 2013




:psyduck: our new database guy with like 15 years of experience doesn't know how to use version control and is barely literate enough to install sourcetree, how the gently caress do these people exist

cinci zoo sniper
Mar 15, 2013




i do understand now though why he scoffed at datagrip after 20 seconds and has never tried using it again

gonadic io
Feb 16, 2011

>>=

cinci zoo sniper posted:

:psyduck: our new database guy with like 15 years of experience doesn't know how to use version control and is barely literate enough to install sourcetree, how the gently caress do these people exist

1 year of experience, 14 years of not doing changing anything or doing anything new

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.



this was the best one for sure

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

cinci zoo sniper posted:

:psyduck: our new database guy with like 15 years of experience doesn't know how to use version control and is barely literate enough to install sourcetree, how the gently caress do these people exist

aren’t databases kind of impossible to put into version control? I wouldn’t subject someone to git just because they have a handful of janitorial scripts that could maaaaybe benefit from having revisions

cinci zoo sniper
Mar 15, 2013




pokeyman posted:

aren’t databases kind of impossible to put into version control? I wouldn’t subject someone to git just because they have a handful of janitorial scripts that could maaaaybe benefit from having revisions

he is a db architect who writes mountains of initial ddl scripts and whatnot, also asked himself about file versioning solutions in place here. he also uses a database as a db query version control system

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

pokeyman posted:

aren’t databases kind of impossible to put into version control? I wouldn’t subject someone to git just because they have a handful of janitorial scripts that could maaaaybe benefit from having revisions

Databases are. Database schemas, views, sprocs, migrations, roles, and whatnot are all just text scripts and they version control just fine.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I mean I can find database things to put in a vcs I’m just not sure it’s that shocking that someone else hasn’t

cinci zoo sniper posted:

he is a db architect who writes mountains of initial ddl scripts and whatnot, also asked himself about file versioning solutions in place here. he also uses a database as a db query version control system

this does sound worth putting in a vcs tho

cinci zoo sniper
Mar 15, 2013




c tp s: beginning to deploy that tire fire of R project i moaned about before. le stack: centos 7 running postgres 10 and shiny server (?reverse?) proxied through nginx for simple authentification, with database updates through cron'd python scripts. im sure the r part is ready to explode at any moment, but python and databases should manage just fine.

i, lifelong heavy windows user, even wrote a shell script that installs bunch of things and does a couple chmod 777 since im too lazy to figure out permissions

MononcQc
May 29, 2007

You ideally track all the changes that must be done to the prod database. If you alter tables one way or the other, you store that poo poo.

In the best of circumstances you want a tool that can roll forward or backwards with your data according to these queries and transforms. You add a stored procedure? You know which ranges of versions support it, and what modifications may be had. The devs have access to these queries in their testing environments and can even do their planned deploys with it.

If you go "but that may provoke data loss when rolling back or changing formats, that sounds tricky", then yeah sure that's exactly the kind of poo poo you should have contingency plans for, and having all of that poo poo scripted really helps a lot.

If your DBA just cowboys poo poo live with no well-established plan that someone can review, you're in trouble. If your DBA (or ops person if on a budget) has an executable script, then why the hell wouldn't they want to track versions with it.

Interview questions someone may have wanted to ask that would have highlighted that:

- how do you see yourself helping developers deal with database changes when it comes to development
- what do you expect the developers should provide you for the same concerns
- what kind of procedures can you think of when it comes to deploying code changes along with database changes? Which ones are necessary, which ones are nice to have?
- etc.

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

cinci zoo sniper posted:

c tp s: *does a couple chmod 777 since im too lazy to figure out permissions*

cinci zoo sniper
Mar 15, 2013




fwiw our database guy is good with databases, and in principle the first database specialist of any kind in the org. im just really surprised i had to hold his hand for cloning an empty git repo he just created

cinci zoo sniper
Mar 15, 2013




also drat what a loving relief is it to see my sh script now running on the server and installing all deps and poo poo. ive never written them before so ill still have to janitor by hand about a dozen config files here and there, but at least i dont have to call yum on 20 things and build all needed r library and whatnot manually

Adbot
ADBOT LOVES YOU

cinci zoo sniper
Mar 15, 2013




sudo bash probably wasnt the best thing to do either but re: chmod 777

  • Locked thread