Skip to content

Commit

Permalink
[AIRFLOW-175] Run git-reset before checkout in PR tool
Browse files Browse the repository at this point in the history
If the user made any changes, git checkout will fail because the
changes would be overwritten. Running git reset blows the changes away.
  • Loading branch information
jlowin committed May 25, 2016
1 parent 805944b commit 6d87679
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev/airflow-pr
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ def clean_up():
if 'original_head' not in globals():
return

click.echo('Resetting git to remove any changes')
run_cmd('git reset --hard')

click.echo("Restoring head pointer to %s" % original_head)
run_cmd("git checkout %s" % original_head)

Expand Down

0 comments on commit 6d87679

Please sign in to comment.