piffy

GitLab1

Sep 25th, 2021 (edited)
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.81 KB | None | 0 0
  1. #eseguire nel terminale bash / git bash con il comando
  2. # bash GitLab1
  3. #
  4. #/bin/bash
  5. echo "Inserisci il tuo nome"
  6. read nome
  7. echo "Inserisci la tua email"
  8. read email
  9. mkdir demo
  10. cd demo
  11. git config --global user.name $nome
  12. git config --global user.email $email
  13. git config --global init.defaultBranch main
  14. git init
  15. echo "Prima riga" > demo.txt
  16. git add .
  17. git commit -m "primo commit"
  18. echo "Seconda riga" >> demo.txt
  19. git commit -am "secondo commit"
  20. echo "Prima riga" > demo.txt
  21. git add .
  22. git commit -m "secondo file"
  23. mkdir temp
  24. echo "*.png" > ".gitignore"
  25. echo "temp/" >> ".gitignore"
  26. echo "Inutile" > temp/inutile.txt
  27. git add .git
  28. git commit -m "inutile è ignorato"
  29. git commit -m "aggiunge solo .gitignore e non il file inutiile"
  30. git log
  31. echo "Ora aggiungete il file inutile con l'opzione -f"
  32.  
  33.  
  34.  
Add Comment
Please, Sign In to add comment