Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/sh
  2. # Normalize Git Repo
  3. # Move insides of repo folder to the root
  4. # usage: normalize_git_repo.sh <BRANCH_NAME>
  5. fix_branch_name=$1
  6. goc $fix_branch_name
  7. echo $fix_branch_name >> README.md
  8. folder_name=($(ls -d */ | cut -f1 -d'/'))
  9. echo $folder_name
  10. mv $folder_name/* .
  11. rm -rf $folder_name
  12. gs
  13. git add -A
  14. gs
  15. git commit -am 'Normalized repo'
  16. gs
  17. git push origin HEAD
  18. goc master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement