main.sh 250 B

1234567891011121314151617181920
  1. #!/bin/sh -efu
  2. # Initialize git repository.
  3. git init
  4. # Add file.
  5. git add main.sh
  6. # Make commit.
  7. git commit --edit
  8. # Modify.
  9. cat > a << EOF
  10. hello!
  11. EOF
  12. # Add to staged area.
  13. git add a
  14. # Show cached area.
  15. git diff --cached
  16. # Commit.
  17. git commit --edit