You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
939 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. Source: [https://www.atlassian.com/git/tutorials/dotfiles]
  2. # Initialization
  3. ```sh
  4. git init --bare $HOME/dotfiles
  5. alias dot="/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME" (add this to .zshenv or .bashrc)
  6. source .zshenv
  7. dot config --local status.showUntrackedFiles no
  8. git remote add origin https://gitea.cloudpshere.duckdns.org/marc/dotfiles.git
  9. git remote -v
  10. ```
  11. # Usage
  12. ## Add or edit files in repository
  13. ```sh
  14. dot add /path/to/file
  15. dot commit -m "some message"
  16. dot push
  17. ```
  18. ## move to a new computer
  19. ```sh
  20. cd
  21. alias dot="/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME" (add to .bashrc)
  22. source .bashrc
  23. echo "dotfiles" >> .gitignore
  24. git clone --bare https://gitea.cloudsphere.duckdns.org/marc/dotfiles.git $HOME/dotfiles
  25. dot checkout
  26. cd dotfiles
  27. dot config --local status.showUntrackedFiles no
  28. ```
  29. ## pull repository
  30. ```sh
  31. dot clone https://gitea.cloudsphere.duckdns.org/marc/dotfiles.git
  32. dot pull origin master
  33. ```