Skip to contentSkip to conversation

Proposed command: git-sync

DISCUSSION Sven Herzberg 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I really regularly find myself typing git pull directly after git push. That's why I write a small shell script that might be added to the stock git distribution.

Regards,
Sven

PS: Please add me to the CC of your replies, I don't read this list.

#!/bin/bash

git push && git pull

#1 lore raw
Quoted 3 lines · Sven Herzberg

I really regularly find myself typing git pull directly after git push. That's why I write a small shell script that might be added to the stock git distribution.

this is the default behavior of git push in recent gits.

Signature · 3 lines
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org
#2 lore raw
In reply to Sven Herzberg
Quoted 11 lines · Sven Herzberg

I really regularly find myself typing git pull directly after git push. That's why I write a small shell script that might be added to the stock git distribution.

Regards,
Sven

PS: Please add me to the CC of your replies, I don't read this list. #!/bin/bash

git push && git pull

I know this isn't really helpful, but you can accomplish the same thing by putting the following in your ~/.gitconfig:

[alias]

	sync = "! git push && git pull"

Eyvind Bernhardsen