Skip to content

Instantly share code, notes, and snippets.

@TSMMark
Last active January 12, 2025 23:16
Show Gist options
  • Select an option

  • Save TSMMark/99d7153c97b0c0762bd6105f0e39f8e2 to your computer and use it in GitHub Desktop.

Select an option

Save TSMMark/99d7153c97b0c0762bd6105f0e39f8e2 to your computer and use it in GitHub Desktop.

Revisions

  1. TSMMark revised this gist Jan 12, 2022. No changes.
  2. TSMMark revised this gist Jun 1, 2021. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion delete_local_branches.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
    git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -r -n 1 git branch -D
    2 changes: 1 addition & 1 deletion z_example_run.log
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # See: http://stackoverflow.com/a/28020809/2696867
    mark$ git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
    mark$ git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -r -n 1 git branch -D
    Fetching origin
    From github.com:tsmmark/vydia
    x [deleted] (none) -> origin/UI/description-errors
  3. TSMMark renamed this gist Feb 19, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. TSMMark revised this gist May 4, 2016. 2 changed files with 0 additions and 0 deletions.
    File renamed without changes.
  5. TSMMark revised this gist May 4, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions example run
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    # See: http://stackoverflow.com/a/28020809/2696867
    mark$ git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
    Fetching origin
    From github.com:tsmmark/vydia
  6. TSMMark created this gist May 4, 2016.
    73 changes: 73 additions & 0 deletions example run
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    mark$ git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
    Fetching origin
    From github.com:tsmmark/vydia
    x [deleted] (none) -> origin/UI/description-errors
    x [deleted] (none) -> origin/UI/even-more-style-tweaks
    x [deleted] (none) -> origin/UI/make-merge-tags-look-more-disabled
    x [deleted] (none) -> origin/UI/more-style-tweaks
    x [deleted] (none) -> origin/UI/move-connect-socials
    x [deleted] (none) -> origin/UI/remove-redundant-social-input-fields
    x [deleted] (none) -> origin/UI/unconnected-vevo-disabled-title-text
    * [new branch] ui/description-errors -> origin/ui/description-errors
    * [new branch] ui/even-more-style-tweaks -> origin/ui/even-more-style-tweaks
    * [new branch] ui/make-merge-tags-look-more-disabled -> origin/ui/make-merge-tags-look-more-disabled
    * [new branch] ui/more-style-tweaks -> origin/ui/more-style-tweaks
    * [new branch] ui/move-connect-socials -> origin/ui/move-connect-socials
    * [new branch] ui/remove-redundant-social-input-fields -> origin/ui/remove-redundant-social-input-fields
    * [new branch] ui/unconnected-vevo-disabled-title-text -> origin/ui/unconnected-vevo-disabled-title-text
    Fetching staging
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    The RSA host key for ec2-54-213-156-142.us-west-2.compute.amazonaws.com has changed,
    and the key for the corresponding IP address 54.213.156.142
    is unchanged. This could either mean that
    DNS SPOOFING is happening or the IP address for the host
    and its host key have changed at the same time.
    Offending key for IP in /Users/mark/.ssh/known_hosts:16
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the RSA key sent by the remote host is
    REDACTED
    Please contact your system administrator.
    Add correct host key in /Users/mark/.ssh/known_hosts to get rid of this message.
    Offending RSA key in /Users/mark/.ssh/known_hosts:6
    RSA host key for ec2-54-213-156-142.us-west-2.compute.amazonaws.com has changed and you have requested strict checking.
    Host key verification failed.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    error: Could not fetch staging
    Fetching production
    fatal: 'src/vydia.git' does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    error: Could not fetch production
    Deleted branch UI/445-email-on-guest-upload-complete (was d617b3a).
    Deleted branch UI/confirmation-required-indicator-cc-form (was f32a36a).
    Deleted branch UI/user-detail-page (was b96da79).
    Deleted branch bug-more-fixes-for-advanced-rights (was 773a1a3).
    Deleted branch bug/a2v/artist-name-overflow (was 0fed2b1).
    Deleted branch bug/billing-date-in-past (was 321175e).
    Deleted branch bug/fix-maintenance-mode (was b831d88).
    Deleted branch bug/fix-renewal-presets-always-reverting-to-default (was ee2614d).
    Deleted branch change-media-artist-bug (was 75da3f9).
    Deleted branch feature/introduce-resque-scheduler-web (was 9e350cf).
    Deleted branch feature/move_release_message_to_another_release (was cf6c739).
    Deleted branch feature/youtube-import-routes (was 1fcbc56).
    Deleted branch fork/redirect-after-payment-choose-service (was 24afb4f).
    Deleted branch initial-notifications (was 8f05b96).
    Deleted branch internal/add-backtrace-to-payment-revert-report (was f83e92d).
    Deleted branch internal/random-failure-in-discounts-model-tests (was 5c9cc34).
    Deleted branch internal/test-some-deployments (was 2d56df6).
    Deleted branch poltergeist-integration-testing (was 04e02c1).
    Deleted branch pr/842 (was ef37f1e).
    Deleted branch spike/publisher-files-presenter (was 26cbe42).
    Deleted branch staging (was ed83c49).
    1 change: 1 addition & 0 deletions local_branches_ordered_bydate.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
    1 change: 1 addition & 0 deletions script.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D