Last active
          August 29, 2015 14:00 
        
      - 
      
 - 
        
Save adelegard/11190610 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # This script will move any uncommitted changes in your current git repo directory to a personal | |
| # branch equal to your computer name | |
| # I wrote this with the intention of running this at the end of the day on all git branches that still have uncommitted code | |
| # ... just in case I crash my bicycle on my way home and destroy my computer | |
| git stash >/dev/null && | |
| git checkout -b $(uname -n) --quiet && | |
| git stash pop >/dev/null && | |
| git add . && | |
| git commit -m "your uncommitted changes committed!" --quiet && | |
| git push --quiet | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment