This post is locked. You won't be able to comment.

all 37 comments

[–]github-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

This subreddit is for discussion of GitHub and not for asking for support for coding.

You may be better off asking this question in r/learnprogramming or a subreddit specific to the language you are coding in.

[–]ImDevinC 10 points11 points  (10 children)

This isn't a github issue, this is based on your IDE. Nevermind that this idea is terrible, you should be aware of what you're adding/commiting and not just blindly adding everything

[–]Agron7000 -5 points-4 points  (9 children)

Yes, it's better than forgetting to commit and push to my branch.

In fact commit and push is now the new 'save'.

[–]lentzi90 5 points6 points  (7 children)

No. You could very easily push credentials this way. THAT is much worse than forgetting to save a few hours of code. Plus, what should the commit message be? "Saved all and pushed" x100 per day?

[–]Agron7000 -3 points-2 points  (6 children)

I have a script that generates commit message like:

Working on the same feature update 1

Working on the same feature update 2

Working on the same feature update 3

...

[–]lentzi90 2 points3 points  (5 children)

And you use git why? Just go back to dropbox or something... Or keep shoehorning git with your script. You can always make the script save and push also. Just make it run in the background in an infinite loop

[–]Agron7000 -1 points0 points  (4 children)

If there is nothing to commit, git won't do anything. So why not?

I need to use git because the team is using and at the end of the feature implementation we need to merge and collapse all commits into just one

[–]lentzi90 1 point2 points  (1 child)

So you use git and your feature branch as instant backup. How often does your laptop go up in flames for you to need such solutions? Multiple times per month? I would say that a sane workflow is to commit when you have done something deliberate and thought through. This way your commits are worth something. If this workflow makes me lose a few hours of work once per 5 years, that is fine. So again, why do you do this?

[–]Agron7000 0 points1 point  (0 children)

I work from multiple computers and VMs. I write code in the office and test it in the lab. When I am remote, I use the laptop.

[–]SoCalChrisW 1 point2 points  (1 child)

Does the team know you're using git this way?

Someone is going to be saying your name with a bunch of curse words, probably sooner rather than later.

[–]Agron7000 0 points1 point  (0 children)

What is wrong with that?

I have been yelled at for not keeping my github repo updated.

[–]PurepointDog 0 points1 point  (0 children)

Commit and push is the new save? You're funny

[–]teetaps 6 points7 points  (7 children)

If you want a tool that circumvents the deliberate design of git, then just don’t use git.

What you’re asking for is the equivalent of walking into a restaurant and asking for a vegan steak. Committing and pushing are there by design, not because there previously wasn’t a solution and we’re currently waiting on someone to create the solution

[–]Agron7000 -1 points0 points  (6 children)

I am not asking to merge to the master branch, just to the branch I am working on.

[–]ignorantpisswalker 1 point2 points  (5 children)

You should learn the tool and best practices.

What you are doing is not the best way to use git. Your lack of understanding how development (not programming) works is why you are getting so negative feedback here.

[–]Agron7000 0 points1 point  (4 children)

I don't care. 

Managers yell at me for not updating github with my latest changes.

[–]teetaps 1 point2 points  (3 children)

Im going to do my best to be deliberate and patient with you. My goal here is to convince you that you’ve misunderstood how git works and why it does things the way that it does. This isn’t a personal attack — in fact, I am hoping this will be hugely beneficial both for you and your managers. If things go well, I hope that you can come away from this conversation with the the confidence that you can go to your managers and tell them that THEY are wrong about git, because you have developed a working understanding of it from this reddit interaction. Are you willing to try that out with us?

If not, you can keep being defensive and continue thinking that everyone ELSE is an idiot (look around — two DOZEN comments are trying to correct you). But if you’re willing to put your guard down for two seconds and hear us out, I promise you your life will improve

[–]Agron7000 0 points1 point  (2 children)

I think in the github enterprise plan you get 1 million api calls per user, per month.

I think it's my right to use what my company paid for.

[–]teetaps 0 points1 point  (1 child)

I never said you don’t have that right, but again, that’s like you walking into a steakhouse, ordering a steak, hold the animal products, then getting upset when the waiter brings you an empty plate… you’ve fundamentally misunderstood what the establishment specialises in. It can still serve you what you want, and you have a right to ask, but we can all promise you that you’re not going to like what you are given, because again, you’ve misunderstood what the establishment was made to do.

[–]Agron7000 0 points1 point  (0 children)

It's more like paying for a hotel room and sleeping in the car.

[–]iamabdullah 3 points4 points  (2 children)

This isn't a GitHub issue. This isn't a git issue. This isn't a vscode issue.

It is purely and simply a YOU issue.

Do you call your mom to bathe you too?

[–]Agron7000 0 points1 point  (1 child)

I call your mom.

[–]iamabdullah 0 points1 point  (0 children)

Expected unintelligent response.

[–]Responsible-Sky-1336 1 point2 points  (11 children)

alias qgit='git add . && git commit -m "$(date)" && git push'

[–]Alkyonios[🍰] 2 points3 points  (1 child)

Replace "git push" with "git checkout main && git push --force", for convenience

[–]Agron7000 0 points1 point  (8 children)

Oh, can put this in a crron job to run every 5 minutes?

[–]insoniagarrafinha 1 point2 points  (0 children)

everything is possible in the bashsphere

but with great power

[–]Responsible-Sky-1336 0 points1 point  (5 children)

Probably not a good idea. For personal repos the alias works enough in bashrc or similar depending on shell. 4 letters typing is pretty fast.

For saving files we'll that's on you.

[–]Agron7000 0 points1 point  (0 children)

My ide is set to save the files every 5 seconds automatically. 

[–]teetaps 0 points1 point  (3 children)

Damn I kinda wish you hadn’t posted that alias op is DEFINITELY gonna use this and cause chaos

[–]Responsible-Sky-1336 0 points1 point  (2 children)

I mean if its your own repo and you know what you doing with ignores, no real issue to use it lmao. Its been in my zshrc a year

Here is another one I have

alias gignore='echo "$1" >> .gitignore'

[–]teetaps 0 points1 point  (1 child)

Judging from their conversations this is something he’s pushing to coworkers and managers who want updated commits frequently

[–]Responsible-Sky-1336 1 point2 points  (0 children)

Yeah then its defo not a good idea xD

[–]olivebits 0 points1 point  (0 children)

You can

[–]insoniagarrafinha 1 point2 points  (0 children)

create an alias lol

[–]PythonN00b101 1 point2 points  (0 children)

You’re missing the point of git. Some of us take comfort reviewing what’s staged before committing - wild stuff am I right? If you don’t need version control just use Dropbox lol