-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actually perform the push and revert #3
base: master
Are you sure you want to change the base?
Conversation
Nice!! At least now it is actually doing something! |
@@ -1,4 +1,11 @@ | |||
BRANCH=`git symbolic-ref --short HEAD` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a shebang line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix'd
git-pushdemont
Outdated
echo "Your commits are now being pushed" | ||
git push -f $REMOTE $BRANCH | ||
|
||
for i in 1 2 3 4 5 6 7 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i in {1..8}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix'd
@@ -1,4 +1,11 @@ | |||
BRANCH=`git symbolic-ref --short HEAD` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if git exists
@alanbover Feel free to perform those changes in a separate pull request ;) |
@tsjost your standards are not approved by european union, so the whole process is invalid, and I have 155 reasons to provide you |
Please merge this! @voghDev |
Not a good idea, actually reverting a pushed commits would mean rewriting history... well... it should be implemented. Maybe in the ANC branch? |
It's not really rewriting history per se; just restoring the state of the remote like it was before pushing, while still allowing all the 155 different git hooks to execute. |
Hi everyone, thanks for the support and the contributions @tsjost @jhg-tgu @VChoubard @alanbover performing the real execution of the command then reverting the results by rewriting the history can be risky, and someone may suffer data loss or any inconsistence when "performing a demo" of the command in his or her repository. It would be really bad if this happens, and it would be in part my fault. The command was thought to laugh, have some fun and of course not to damage anyone's code :-P Also, printing just words (echo's) and not performing any real action is funnier and maybe closer to the reality :)) That's why I think it is better to keep the command just as pure fun, and not causing a real effect on people's repositories. Feel free to express your opinions about this. Again, thanks everyone and I hope you liked and enjoyed the command Peace! |
@voghDev As I said above, the script will restore the remote repo to the state it was in before the script was executed (however I haven't verified that it will work in all cases e.g. in a merge conflict state or such weird things). But alas, I will have to maintain my own fork then :) |
We want to actually signal the remote that we're doing something, and then suspend our changes.