|
But Google puts everything in one repo!
|
# ? May 11, 2017 23:17 |
|
|
# ? May 30, 2024 12:16 |
|
Thermopyle posted:Why are they in the same repository at all? If they all unrelated this is the correct way. Axiem posted:But Google puts everything in one repo! Yeah, because they are all intertwined. My last job had a bunch of lovely microservices that all dependend on each other in separate repos and adding new features across them was the worst.
|
# ? May 11, 2017 23:41 |
|
Agreed with everything else that's been mentioned. If there's no dependencies between your three projects, split them out into their own repos. It'll be easier to dev and deploy as time goes on.
|
# ? May 12, 2017 01:28 |
|
Axiem posted:But Google puts everything in one repo! Google also has a shitload of extra infrastructure and tooling (including, y'know, a custom version control system) that lets that work for them.
|
# ? May 12, 2017 03:19 |
|
|
# ? May 12, 2017 04:36 |
|
Unfortunately, it's not my Git repo to decide the structure.
|
# ? May 12, 2017 16:40 |
|
huhu posted:Unfortunately, it's not my Git repo to decide the structure. I wonder about the feasibility of using your own repo structure locally and then just drop your changes into their weirdass repo when you're ready to deploy...
|
# ? May 12, 2017 16:56 |
|
Should be relatively straight forward with subtrees: https://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging
|
# ? May 12, 2017 17:36 |
|
necrotic posted:Should be relatively straight forward with subtrees: https://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging Are subtrees the new sub-modules? I've never heard of those before
|
# ? May 13, 2017 01:01 |
|
Not new in the direct sense, but a replacement yes. The previous chapter of that book tries to do the same thing with submodules as a setup for the subtree chapter.
|
# ? May 13, 2017 04:48 |
|
So, I understand in theory that git is decentralized version control. But practically, if our git server is down, how do I share a commit or branch with someone else on my team?
|
# ? May 15, 2017 12:48 |
|
smackfu posted:So, I understand in theory that git is decentralized version control. But practically, if our git server is down, how do I share a commit or branch with someone else on my team? Clone your repo to a shared network folder or open a private gitlab.com account (whichever is more convenient) and set it as a remote repo for both of you.
|
# ? May 15, 2017 12:53 |
|
smackfu posted:So, I understand in theory that git is decentralized version control. But practically, if our git server is down, how do I share a commit or branch with someone else on my team? git remote add yourteammate user@yourteammate.local:/path/to/their/repo git fetch yourteammate git push yourteammate master 'origin' is just mutually agreed upon name for the first remote. But there's nothing magical about it or any other remote.
|
# ? May 15, 2017 15:36 |
|
I just signed up for a Bitbucket account to submit a bug to a thing I use and I'm actually liking the interface a lot more than Github. I added 2FA which meant I had to add a secondary email so I put my university one and now apparently I have been upgraded to an Academic plan which from what I can tell is a paid plan but free and without the restrictions of a free plan. Is there any compelling reason to choose Github over Bitbucket? A lot of my repositories are private ones that I don't want shared (research notes, things I'm working on right now for my phd, random side projects I don't wanna release, etc). From a quick search it seems people say to use Bitbucket for private repositories, but I get unlimited private repos on github as well. It looks like Bitbucket gives you more tools like Pipelines/CI that should "just work" for private repositories or am I missing something? These things sound neat and might be something I wanna play around with. Git lab is out of the question because their UI is atrocious.
|
# ? May 19, 2017 07:30 |
|
Not really. Bitbucket is fine and good and there's no reason to not use it if you like it. I like Github's PR/Code Review mechanisms better. Github pages is cool. Github has a similar free program https://education.github.com/pack
|
# ? May 19, 2017 13:47 |
|
How do I import a private Github repo into Bitbucket without giving Bitbucket my GitHub username and password? It seems really weird that Bitbucket is asking for the password to another service and I refuse to give them that just on principal. Fake edit: this is from the Bitbucket "import from other repository" page. I presume that instead of doing this I could just make a new repo on Bitbucket and push the old repo to it but would that result in any loss of history?
|
# ? May 20, 2017 09:50 |
|
it would not. all history is stored in the repo
|
# ? May 20, 2017 13:07 |
|
For Github -> Bitbucket, you should be able to use a Github Personal Access Token, which is more like an API key. You can then kill this key after import.
|
# ? May 20, 2017 13:36 |
|
I just created a new empty repository on Bitbucket and pushed my local branch(s) to it. Works fine and all the history is there but there are no issues or tags. The tags part I think is just cause I didn't/forgot to push up the tags so that's whatever. But what about issues? I always thought that issues were like a standardized thing in the git spec but now I'm reading about them and I guess they're not? I've found some ways to migrate them through searching but I really can't be bothered too much about them, for my use case I mean. B-Nasty posted:For Github -> Bitbucket, you should be able to use a Github Personal Access Token, which is more like an API key. You can then kill this key after import. Could that have been used to generate a one use password I could have given to Bitbucket? The page was specifically asking for a username and password so I didn't think about the personal access tokens cause I thought they gave you just a token you'd use in place of a username/password combo.
|
# ? May 20, 2017 18:02 |
|
Boris Galerkin posted:The tags part I think is just cause I didn't/forgot to push up the tags so that's whatever. But what about issues? I always thought that issues were like a standardized thing in the git spec but now I'm reading about them and I guess they're not? They sure aren't. Git is a revision control system. That's it.
|
# ? May 20, 2017 21:33 |
|
New Yorp New Yorp posted:They sure aren't. Git is a revision control system. That's it. To be fair though notes don't fit into being a revision control system and that's it.
|
# ? May 20, 2017 23:00 |
|
https://blogs.msdn.microsoft.com/bharry/2017/05/24/the-largest-git-repo-on-the-planet/quote:Windows is live on Git
|
# ? May 24, 2017 21:47 |
|
I have recently jumped on a project that uses Git and other people have put files particular to them (such as configuration files particular to their needs) in the project root directory. I want to clean this up and remove them from the repo. However, if possible, I would like to avoid the situation where they do a pull and their local copies of those files get removed from disk. I don't know if this is possible and kind of doubting it. I know locally I can run 'git rm --cached some.file' and it will remove the file from the repo, but keep my local file on disk. Is there a way to effectively do something similar when someone else pulls the repo where they still keep their local copy of the file which is no longer a part of the repo?
|
# ? May 30, 2017 18:52 |
|
I'm thinking there should be some way to do what you're wanting to do by adding those files to the .gitignore file. But I'm not sure what the interaction is if they don't have the updated gitignore before they pull the changes that remove the files...
|
# ? May 30, 2017 19:03 |
|
They'll have to copy the file somewhere else locally beforehand, or use something like this after pulling down your commit:code:
Snak posted:I'm thinking there should be some way to do what you're wanting to do by adding those files to the .gitignore file. But I'm not sure what the interaction is if they don't have the updated gitignore before they pull the changes that remove the files... .gitignore only matters for adding files to your stage. If you ignore a file already in the tree it will prevent adding changes to the file without the force flag. It won't help for what he wants (although those files should 100% be added to the gitignore so it doesn't happen again).
|
# ? May 30, 2017 21:46 |
|
necrotic posted:They'll have to copy the file somewhere else locally beforehand, or use something like this after pulling down your commit: Yeah, I figured there wasn't a way to do it exactly as I wanted and they'd need to fetch the file from some previous repo state. I was hoping to avoid that because I'm sure someone is going to whine.
|
# ? May 30, 2017 21:56 |
|
Change the file to some ridiculous settings so they see the problem with it as is.
|
# ? May 30, 2017 23:54 |
|
is this really the best way to get git-diff to ignore whitespace globally? how is there not a generic "diff argument" setting?
|
# ? Jun 8, 2017 05:04 |
|
edit: nevermind, that was not what I thought it was! Yeah, that's dumb.
|
# ? Jun 8, 2017 15:04 |
|
I have all my dotfiles in a public git repo except for my ssh/.config file just cause it has random IP addresses (and usernames) for machines I use. Is there a way I could transparently encrypt this one file so that I can just throw it into the same dotfiles repo I have so I don't have to clone two of them on a new setup? I don't think it's necessarily damaging or bad that I'd store those IP address in a public repo in plain text since I'm not doing anything stupid like wanting to keep my (passphrase protected) rsa keys on there but I'd just rather not leak out my IP addresses you know?
|
# ? Jun 10, 2017 14:42 |
|
Is there a reason it has to be a public repo? I do something similar but just use a private repo...
|
# ? Jun 10, 2017 15:31 |
|
Yeah just use bitbucket for that as you get free private repos.
|
# ? Jun 10, 2017 19:07 |
|
Or just put it on one of the machines you can ssh into.
|
# ? Jun 10, 2017 20:31 |
|
My company just rolled out Gerrit Code View and so I now need to rely on a git hook to append a ChangeId to my commits. This is the first time I'm using hooks and none of them seem to be triggering. I don't even know where to start troubleshooting this really. Hooks seem to just be shell scripts. I can't even get a basic one that echo's a string to trigger. Permissions are set properly. What else should I be looking at?
|
# ? Jun 19, 2017 18:15 |
|
Does the hook file have an extension? They have to be hook-name exactly, no extensions. Hooks can be any executable file, as long as the name matches. If it's a shell script (or any other interpreted file) you need a shebang at the top declaring the interpreter. If the name is correct I'd sprinkle some debug statements in the script and make sure they are output. edit: added some more. necrotic fucked around with this message at 23:46 on Jun 19, 2017 |
# ? Jun 19, 2017 23:42 |
|
necrotic posted:Does the hook file have an extension? They have to be hook-name exactly, no extensions. Hooks can be any executable file, as long as the name matches. No extension. Shebang at top. Debug statements don't fire. Even something as simple as this: code:
|
# ? Jun 20, 2017 01:38 |
|
Welp, figured it out. It turns out I had some github wrapper installed, called hub, which was aliased to git. Surely this is the issue, I thought. Cleaned up hub, got rid of the alias, made sure I'm actually calling /usr/bin/git. Still no luck. This is on OSX, so no strace. Dtrace is available though, so I tried that out. Turns out, git was looking for my hooks in ~/.git-support/hooks. code:
code:
code:
|
# ? Jun 20, 2017 19:17 |
|
I'm using Git LFS with my Bitbucket account and I noticed I have a few large binary files that still show up in the LFS storage online but I'm 99% sure that I've deleted them and don't need them anymore. Is my understanding correct that these files still show up in the LFS repository simply because some old commit(s) reference them? If so I would like to just delete them from the website interface to free up some limited LFS space I get. Follow up question, is there a more "git" way to remove these files from the command line? Like some kind of git lfs prune or similar command?
|
# ? Jul 11, 2017 07:55 |
|
Boris Galerkin posted:I'm using Git LFS with my Bitbucket account and I noticed I have a few large binary files that still show up in the LFS storage online but I'm 99% sure that I've deleted them and don't need them anymore. Is my understanding correct that these files still show up in the LFS repository simply because some old commit(s) reference them? If so I would like to just delete them from the website interface to free up some limited LFS space I get. I'm not familiar with LFS usage, but with git in general it is the case that a "deleted" file still exists in the history. You have to use filter-branch to go back through history and delete the files from every previous commit, thus building an entirely new history. This also means the repo will be 100% out of sync with anyone else using it. GitHub has a pretty good article on removing files completely: https://help.github.com/articles/removing-sensitive-data-from-a-repository/ All of it should apply to LFS as well. Boris Galerkin posted:
All git commands should work against LFS files, right? So git rm the/file.bin and then commit the deletion.
|
# ? Jul 11, 2017 15:42 |
|
|
# ? May 30, 2024 12:16 |
|
I have a personal fork of an open source project on github (because I'm not an official maintainer of the main project). I made some small changes and did a couple pull requests (which got accepted, yay!) and then I wanted to sync my fork with upstream again. Of course I still have no idea what I'm doing in git and I ended up mangling everything so my github fork shows I'm some # of commits "ahead" of upstream, which are all just duplicated commits plus a merge commit. Is there a simple way to fix this so my fork is just matching with upstream master again?
|
# ? Jul 16, 2017 22:07 |