|
necrotic posted:Gitea is way better than gitolite and lightweight as hell. This look cool, I'll give it a try. Thanks.
|
# ? Jun 7, 2018 15:42 |
|
|
# ? Jun 8, 2024 09:23 |
|
Murrah posted:Sooooo talking about switches... my small company is about to make the switch from.... Subversion to Git! Talk about time for modernizing. I've helped transition two huge teams to this over the course of my career so far. Make sure everyone understands the differences and be prepared to help some of the weaker git members get up to speed. Git is great, but does take a little bit of learning to really get going. Don't be afraid to use a GUI tool instead of forcing everyone on CLI.
|
# ? Jun 7, 2018 17:17 |
|
I'm making something that involves a secret key to pull data from an API, but I obviously don't want that on Github. What do I do about pushing the file but hiding the secret key? I've seen mention of config files but I'm not sure how they work with python/windows.
|
# ? Jul 7, 2018 10:43 |
|
Mrenda posted:I'm making something that involves a secret key to pull data from an API, but I obviously don't want that on Github. What do I do about pushing the file but hiding the secret key? I've seen mention of config files but I'm not sure how they work with python/windows. I don't know python, but the Windows INI file format seems simple enough that it could be used with layered config files. You put everything you don't mind disclosing into the main configuration file and use placeholder values for anything sensitive like API keys. You read that with ConfigParser.read as usual. Then you use the same instance of ConfigParser to .read a second configuration file, which will only contain those sensitive configuration values. The values in the sensitive configuration file will override the placeholders in the main configuration file. You commit the main configuration file as usual, and put the sensitive configuration file's name into a .gitignore file in the root folder of the repository. Afterwards, git will ignore that sensitive configuration file and keep it out of source control even if it changes.
|
# ? Jul 7, 2018 10:55 |
|
Mrenda posted:I'm making something that involves a secret key to pull data from an API, but I obviously don't want that on Github. What do I do about pushing the file but hiding the secret key? I've seen mention of config files but I'm not sure how they work with python/windows. The most popular way of handling this is reading the secret key from an environment variable and never having it in your code base anywhere. edit: of course, I just assumed this was a web server because surely everyone is writing the same sort of code as me...right?
|
# ? Jul 7, 2018 15:10 |
|
Update: my small companies migration from subversion to Git is going smooth. The only hangup was that it turned out there were some overlapping case sensitive files i.e E.png and e.png that were in version control on subversion. Because we handled these files on linux remotes there was no issue. It took making changes to the files and then completely blasting/ re cloning the git repo on my mac and on a coworkers windows computer that were set to case insensitive to get going
|
# ? Jul 7, 2018 22:24 |
|
For some of my projects, from the start I put a create a config.py.template file, put config.py in my .gitignore, then copy the template file to config.py and put my keys in there.
|
# ? Jul 8, 2018 00:16 |
|
huhu posted:For some of my projects, from the start I put a create a config.py.template file, put config.py in my .gitignore, then copy the template file to config.py and put my keys in there. Use something like foreman run or dotenv to easily inject environment variables, then have the config.py use those variables.
|
# ? Jul 8, 2018 01:14 |
|
I'm wondering if there's a way in git to specifically check for lines that were changed in branch A versus branch B. You might think that git diff is what I'm talking about, but I don't care as much about lines that branch B changed versus branch A. I'm trying to do a final sanity check that I have merged fixes from a release branch back into master. Master has a few more changes in it that I don't want to pollute the output. My idea is that I might just find one or two lines that I can determine where additions on master to changes that may have come in from the release branch already, and be able to tell that I have covered everything.
|
# ? Jul 17, 2018 15:28 |
|
I've used git for years, and suddenly on a single project I'm having the most bizarre behavior: commits are just vanishing. Nothing in the log, no revert, not a merge. Like the commit was just skipped over at some point and the tree rebuilt without it. I thought it was some bizarre merge artifact, but after the 4th time I've made the same fix I started searching, and once again it's only present in the tip of the tree. I feel like I'm going insane. I checked unreachable, and lost+found, and reflog. I'm beyond confused. Now the repo has a ****** WHY THE gently caress DOES THIS FIX KEEP VANISHING ***** with 10 lines of asterisks, because if that's gone I just don't know. E: this is on my local machine, not the shared repo - nobody else has access for wacky hijinks. I've had entire feature sets working and tested - and other people tested the local server as well, that just went away without a single trace.
|
# ? Jul 24, 2018 01:33 |
|
I had something happen before but it was long enough ago that I can't tell if it was more that I wasn't capable of understanding the problem or if there really was something screwy happening. I ended up cloning again and it just went away like that. I think even if you are having disk problems that generally git will notice that something is screwy. It shouldn't work this way at all because your commit wedged in the middle of the history should change the checksums of the commits that follow it. I can only think that git mended around it and you did an aggressive GC that wiped the orphan.
|
# ? Jul 24, 2018 02:00 |
|
I would check your GC settings and make sure it's not super-aggressive somehow. Maybe you're doing a rebase or something and some part of your tooling is accidentally destroying commits combined with an aggressive GC? You could also try pushing your work to a repo regularly in a feature branch and see if it ever differs from your local branch. That remote repo can even be on the same local disk as your working local repo.
|
# ? Jul 24, 2018 02:17 |
|
Rocko Bonaparte posted:I had something happen before but it was long enough ago that I can't tell if it was more that I wasn't capable of understanding the problem or if there really was something screwy happening. I ended up cloning again and it just went away like that. Unless my PC is magically capable of pre-image attacks against SHA2, I'm going with the tooling reflowing the commits around it. comedyblissoption posted:I would check your GC settings and make sure it's not super-aggressive somehow. Maybe you're doing a rebase or something and some part of your tooling is accidentally destroying commits combined with an aggressive GC? GC settings are stock AFICT pre:$ git config -l color.ui=true push.default=simple push.followtags=true core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true branch.master.remote=origin branch.master.merge=refs/heads/master $ git config -l --global color.ui=true push.default=simple push.followtags=true It must be lack of sleep, I'm integrating code from around the world right now which means basically being awake every timezone for a few days. If it wasn't for other people asking where features went I would have thought I was hallucinating doing the work. I must be doing work and hallucinating the commits, then merging code that blows away my uncommitted changes. I should script a force-stash for dirty directories, at least that way they'll exists in .git/objects. Doesn't help that I'm doing it from two separate computers for logistical reasons.
|
# ? Jul 24, 2018 13:43 |
Sounds to me like someone is doing sneaky rebases
|
|
# ? Jul 24, 2018 13:58 |
|
Well in that case, there might be some elf magic in your IDE that can help. PyCharm keeps a history of file changes that I have used before to pluck stuff that I otherwise just could not find anywhere. I don't know all the rules that trigger it other than when saving a file, so such things still won't help if the changes are all offline git commands. I have suffered similar problems before when integrating code and have resorted to cherry picking more than rebasing. Something in my little brain is better about that command even if a rebase is basically cherry picking over and over.
|
# ? Jul 24, 2018 16:11 |
|
Is there a site that provides free private repositories for git? I want to keep some stuff private but don’t want to use a local repo in case my hard drive kicks the bucket. The only other thing I can think of is set up a repo on Google Drive, but I’m not sure how well that works.
|
# ? Aug 13, 2018 18:16 |
|
I use BitBucket for that. I think GitLab also does it now, if you don't like Atlassian.
|
# ? Aug 13, 2018 18:21 |
|
VSTS also provides free private repos.
|
# ? Aug 13, 2018 18:22 |
|
keybase also has a private git repo feature, probably so people stop putting git repos directly on their encrypted distributed file system. I'm not sure how awkward it gets if you want to share the repo with someone eventually, but at least it's gonna be hella encrypted.
|
# ? Aug 14, 2018 15:06 |
|
Does anyone know if it's possible to configure github to do a daily digest of notifications instead of sending an email for each notification? I haven't found it, and I suspect that they don't, since it would probably interfere with the associated workflows of being able to reply to notifications, etc.
|
# ? Aug 27, 2018 13:14 |
|
Please help with babby's first version control system. I am trying to get an on-prem hosted git repo working for our powershell scripts. I need the repo to live on some arbitrary file share, and the goal is to get random workstations and servers to use VSCode to natively work with the remote repo. I can make a remote repo and clone it locally. When I sync in VSCode, which does a pull and then a push, I get the following error: code:
I tested using VSTS, like a month ago and managed to get it working. But for production we need to host it ourselves, and I can't figure out what the hell I'm missing. Edit: To be clear, the goal is for this to be as braindead simple as possible, affecting our workflows as minimally as possible. Right now each person stores their scripts in a different share. They are run from a variety of servers using the Powershell ISE and edited from a similar variety of servers. The plan is to have one share with all scripts, version controlled so that we dont lose changes from being saved in the wrong place or from the wrong machine or whatever. And using VSCode because it's free, it can be pushed to all servers instead of the ISE, and it natively deals with git - having to type a bunch of commands at the shell with every change we make isn't going to work. Edit2: Why the hell did I clone the clone? Happiness Commando fucked around with this message at 02:35 on Oct 2, 2018 |
# ? Oct 2, 2018 02:30 |
|
The portion of the error message you snipped out tells you exactly what setting you have to change on the server to let you push to the checked-out branch.
|
# ? Oct 2, 2018 04:19 |
|
The way I'm parsing this it presents two options 1) you can set this to ignore or warn, but you should update the work tree some other way 2) you can turn off this error message and retain this error behavior. I don't know how to update the work tree some other way, and again, the point is to use whatever VS Code does natively so that we don't have to engage with the command line. code:
Apologies for the phone formatting
|
# ? Oct 2, 2018 13:37 |
|
Are there any good GUI-based programs to work with Git on Windows? I want to set up a repo on my Pi, but my wife wouldn’t want to learn how to work everything through the command line.
|
# ? Oct 21, 2018 21:28 |
|
22 Eargesplitten posted:Are there any good GUI-based programs to work with Git on Windows? I want to set up a repo on my Pi, but my wife wouldn’t want to learn how to work everything through the command line. Sourcetree is decent. But why not use one of the multitude of free repo hosting services instead of using a raspberry pi?
|
# ? Oct 21, 2018 21:34 |
|
SourceTree or gitKraken
|
# ? Oct 21, 2018 21:45 |
|
I find vs code's git integration to be perfectly useable.
|
# ? Oct 21, 2018 22:52 |
|
Any thoughts on tuning the self hosted free version of gitlab vs just plain old git on a server for a team of 5 using about 10 different web projects?
|
# ? Oct 23, 2018 16:09 |
|
Is there a way to define a set of users that can run git push for a particular branch? I'd be cool for revoking everyone's push access to a branch as well. Using the git cli tool only unfortunately.
|
# ? Oct 23, 2018 17:41 |
|
elite_garbage_man posted:Is there a way to define a set of users that can run git push for a particular branch? I'd be cool for revoking everyone's push access to a branch as well. In vanilla Git? No. Are you using a service that hosts repos? If not, start, they all allow that.
|
# ? Oct 23, 2018 17:46 |
|
Well that sucks. Is there a stand alone solution? Unfortunately we can't use external project hosting, or even software that requires and internet connection for licensing.
|
# ? Oct 23, 2018 17:52 |
|
Bob Morales posted:Any thoughts on tuning the self hosted free version of gitlab vs just plain old git on a server for a team of 5 using about 10 different web projects? I might be shilling a bit, but consider
|
# ? Oct 23, 2018 18:06 |
|
New Yorp New Yorp posted:In vanilla Git? No. Are you using a service that hosts repos? If not, start, they all allow that.
|
# ? Oct 23, 2018 19:59 |
|
elite_garbage_man posted:Is there a way to define a set of users that can run git push for a particular branch? I'd be cool for revoking everyone's push access to a branch as well. You can add something to a pre-receive-hook to do that.
|
# ? Oct 24, 2018 00:51 |
|
Thanks for pointing me in the right direction.
|
# ? Oct 24, 2018 15:28 |
|
Check if https://github.com/sitaramc/gitolite fulfils your needs.
|
# ? Oct 25, 2018 00:45 |
|
Sakco posted:Check if https://github.com/sitaramc/gitolite fulfils your needs. Small consultant shop I worked at for a couple years had this on a mac mini for internal projects and it was simple to maintain. I definitely recommend it.
|
# ? Oct 25, 2018 15:42 |
|
Is it possible to make a single file public in a bitbucket repo? I want to be able to send codepens with the images from bitbucket, but I want the rest of it to be private.
|
# ? Oct 28, 2018 17:33 |
|
No, it's a repo level permission only. I don't know of any SCM host that let's you do permissions at the file level. Branch seems more likely, I know some of the servers support branch level permissions but not hosted one's like BitBucket
|
# ? Nov 2, 2018 00:15 |
|
|
# ? Jun 8, 2024 09:23 |
|
22 Eargesplitten posted:Are there any good GUI-based programs to work with Git on Windows? I want to set up a repo on my Pi, but my wife wouldn’t want to learn how to work everything through the command line. https://github.com/gitextensions/gitextensions It's extremely good about being a GUI for Git, rather than a GUI that uses Git under the hood. It's not the prettiest but it's great to use.
|
# ? Nov 9, 2018 23:22 |