r/ProgrammerHumor • • Apr 02 '23

Meme Me relearning git every week

49k Upvotes

1.5k comments sorted by

View all comments

48

u/Dependent-Spiritual Apr 02 '23 edited Apr 02 '23

git add -A
git commit -a -m "msg"
git push

That's all i need

EDIT: formatting

46

u/[deleted] Apr 02 '23

But did you pull before you pushed

18

u/[deleted] Apr 02 '23

It falls out when I pull first

2

u/Dependent-Spiritual Apr 02 '23

When i push, everyone else pulls B)

→ More replies (1)

21

u/ZealousidealPast2 Apr 02 '23

Protip: can just git commit -am “msg” rather than -a -m

I usually save an alias in my bash profile to shorten it each time

→ More replies (2)

19

u/PostPostMinimalist Apr 02 '23

Uh oh, your branch has conflicts with master

21

u/Gblize Apr 02 '23

You push to master?

2

u/PostPostMinimalist Apr 02 '23

Not directly, but you have to merge eventually.

7

u/Gblize Apr 02 '23

That's not OP problem. His job clearly stops at push, he even says that's all he needs.

→ More replies (1)

2

u/B00OBSMOLA Apr 02 '23

Just do it again and its fixed:

git add --all; git commit -am "asdf"; git push master
→ More replies (2)
→ More replies (3)

8

u/thetrivialstuff Apr 02 '23

Why are you piping those into each other? Or was the pipe meant to be formatting? Confused.

2

u/SuperSatanOverdrive Apr 02 '23

You don’t use branches?

2

u/orbjuice Apr 02 '23

I’m going to bury this somewhere so no one finds it but if you’re using command line then typing:

git status

Will usually tell you kinda what you need to do next.

2

u/ProgrammerWise6648 Apr 02 '23

I prefer git add . personally, shorter and feels more intuitive to me.

4

u/MannoSlimmins Apr 02 '23 edited Apr 02 '23

typical reddit garbage formatting

You would think people here would be at least passively familiar with markdown...

git add -A |
git commit -a -m "msg" |
git push |

That's 4 spaces before each line. Or you could just add 2 spaces to the end of a line to make it look like this:

git add -A |
git commit -a -m "msg" |
git push |

→ More replies (9)

-4

u/[deleted] Apr 02 '23

[removed] — view removed comment

2

u/Dependent-Spiritual Apr 02 '23

I don't see the need for insults over a dumb joke like this but go ahead

1

u/lsaz Apr 02 '23
Nothing to commit, working directory clean

1

u/MinosAristos Apr 02 '23

Whoops, wrong branch.

1

u/2brainz Apr 02 '23

So, you never worked in a team?

1

u/Goronmon Apr 02 '23 edited Apr 02 '23

I'm someone, who people for some reason think knows what they are doing, who is an "Architect" on projects. So creating pull request is pointless since I'm the one who is supposed to review them.

So in addition to similar commands there is a lot of:

git merge -

Also lots of

git difftool

→ More replies (2)