Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Actually perform the push and revert #3

wants to merge 5 commits into from

Conversation

tsjost
Copy link

@tsjost tsjost commented Oct 13, 2017

We want to actually signal the remote that we're doing something, and then suspend our changes.

@VChoubard
Copy link

Nice!! At least now it is actually doing something!

@@ -1,4 +1,11 @@
BRANCH=`git symbolic-ref --short HEAD`

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?

Copy link
Author

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

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}

Copy link
Author

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`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if git exists

@tsjost
Copy link
Author

tsjost commented Oct 13, 2017

@alanbover Feel free to perform those changes in a separate pull request ;)

@alanbover
Copy link

@tsjost your standards are not approved by european union, so the whole process is invalid, and I have 155 reasons to provide you :trollface:

@VChoubard
Copy link

Please merge this! @voghDev

@calas
Copy link

calas commented Oct 13, 2017

Not a good idea, actually reverting a pushed commits would mean rewriting history... well... it should be implemented. Maybe in the ANC branch?

@tsjost
Copy link
Author

tsjost commented Oct 13, 2017

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.

@voghDev
Copy link
Owner

voghDev commented Oct 13, 2017

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!

@tsjost
Copy link
Author

tsjost commented Oct 13, 2017

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants