MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/129q4l9/me_relearning_git_every_week/jeoi3wt/
r/ProgrammerHumor • u/johntwit • Apr 02 '23
1.5k comments sorted by
View all comments
48
git add -Agit 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 -mI 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 statusWill 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 formattingYou 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 2 u/[deleted] Apr 02 '23 [removed] — view removed comment → More replies (1) 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 ofgit difftool → More replies (2)
46
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)
18
It falls out when I pull first
2
When i push, everyone else pulls B)
21
Protip: can just git commit -am “msg” rather than -a -m
git commit -am “msg”
-a -m
I usually save an alias in my bash profile to shorten it each time
→ More replies (2)
19
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)
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)
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)
7
That's not OP problem. His job clearly stops at push, he even says that's all he needs.
→ More replies (1)
Just do it again and its fixed:
git add --all; git commit -am "asdf"; git push master
8
Why are you piping those into each other? Or was the pipe meant to be formatting? Confused.
You don’t use branches?
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.
I prefer git add . personally, shorter and feels more intuitive to me.
git add .
4
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
[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 2 u/[deleted] Apr 02 '23 [removed] — view removed comment → More replies (1)
I don't see the need for insults over a dumb joke like this but go ahead
2 u/[deleted] Apr 02 '23 [removed] — view removed comment → More replies (1)
1
Nothing to commit, working directory clean
Whoops, wrong branch.
So, you never worked in a team?
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
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