|
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
|
# ? Dec 19, 2017 13:33 |
|
|
# ? Jun 8, 2024 22:33 |
|
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 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 |
# ? Dec 19, 2017 13:47 |
|
ratbert90 posted:Here are all the commands you need: nothing about merging or rebasing huh. this is a list of "best meals in the city (for one)"
|
# ? Dec 19, 2017 14:08 |
|
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. FlapYoJacks fucked around with this message at 14:12 on Dec 19, 2017 |
# ? Dec 19, 2017 14:10 |
|
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.
|
# ? Dec 19, 2017 15:45 |
|
mods please rename this thread to "gitposting itt"
|
# ? Dec 19, 2017 16:01 |
|
from the coding horrors thread:
|
# ? Dec 19, 2017 16:10 |
|
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
|
# ? Dec 19, 2017 16:11 |
|
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
|
# ? Dec 19, 2017 17:43 |
|
ratbert90 posted:git checkout ${branch} (Make a new branch) the descriptions are flipped, but it's understandable because using checkout -b to make a new branch isn't intuitive anyway
|
# ? Dec 19, 2017 17:59 |
|
implement your own git client with git plumbing imo
|
# ? Dec 19, 2017 18:12 |
|
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.
|
# ? Dec 19, 2017 18:24 |
|
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
|
# ? Dec 19, 2017 18:29 |
|
ratbert90 posted:Here are all the commands you need:
|
# ? Dec 19, 2017 20:50 |
|
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. 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
|
# ? Dec 19, 2017 21:19 |
|
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
|
# ? Dec 19, 2017 21:27 |
|
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 you're probably just going senile. try to get into management asap
|
# ? Dec 19, 2017 23:00 |
|
anthonypants posted:where's the post that tells you how branches are supposed to be used or what rebasing means
|
# ? Dec 19, 2017 23:03 |
|
git rebase -i and git add -p are both great
|
# ? Dec 19, 2017 23:17 |
|
today in old commit messagescode:
|
# ? Dec 19, 2017 23:33 |
|
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
|
# ? Dec 20, 2017 02:39 |
|
Powerful Two-Hander posted:born to merge what’s the reference?
|
# ? Dec 20, 2017 02:55 |
|
brap posted:what’s the reference?
|
# ? Dec 20, 2017 03:05 |
|
Sapozhnik posted:BORN TO ROLLBACK
|
# ? Dec 20, 2017 04:44 |
|
Sapozhnik posted:BORN TO ROLLBACK
|
# ? Dec 20, 2017 06:07 |
|
Sapozhnik posted:BORN TO ROLLBACK
|
# ? Dec 20, 2017 11:29 |
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
|
|
# ? Dec 20, 2017 13:01 |
i do understand now though why he scoffed at datagrip after 20 seconds and has never tried using it again
|
|
# ? Dec 20, 2017 13:03 |
|
cinci zoo sniper posted: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
|
# ? Dec 20, 2017 13:10 |
|
this was the best one for sure
|
# ? Dec 20, 2017 13:11 |
|
cinci zoo sniper posted: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
|
# ? Dec 20, 2017 13:17 |
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
|
|
# ? Dec 20, 2017 13:26 |
|
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.
|
# ? Dec 20, 2017 13:26 |
|
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’tcinci 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
|
# ? Dec 20, 2017 13:53 |
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
|
|
# ? Dec 20, 2017 14:20 |
|
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.
|
# ? Dec 20, 2017 14:22 |
|
cinci zoo sniper posted:c tp s: *does a couple chmod 777 since im too lazy to figure out permissions*
|
# ? Dec 20, 2017 14:35 |
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
|
|
# ? Dec 20, 2017 14:42 |
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
|
|
# ? Dec 20, 2017 14:45 |
|
|
# ? Jun 8, 2024 22:33 |
sudo bash probably wasnt the best thing to do either but re: chmod 777
|
|
# ? Dec 20, 2017 14:45 |