apps:git
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
apps:git [2019-08-31 18:14] – Initial writing jens | apps:git [2020-07-24 09:34] (current) – [Troubleshooting/Q&A] Add ZSH link jens | ||
---|---|---|---|
Line 10: | Line 10: | ||
- Change to that directory and initialize your git repository: < | - Change to that directory and initialize your git repository: < | ||
- Give your project a meaningful description: | - Give your project a meaningful description: | ||
- | - Configure the basics of the git client: < | + | - Configure the basics of the git client:< |
+ | git config --global user.name "Your Name" | ||
+ | git config --global user.email | ||
+ | git config --global credential.helper store | ||
+ | git config --global push.default simple | ||
+ | git config --global color.ui true</ | ||
- Create a README and make the initial commit: < | - Create a README and make the initial commit: < | ||
Line 44: | Line 49: | ||
===== Troubleshooting/ | ===== Troubleshooting/ | ||
- | For now, just two things. This section will be expanded in future. | + | |
- | | + | * If you use this for [[: |
- | * If you use this for [[: | + | * In case you forgot to delete your branch on the server, or want to just delete it remotely, you can do that: < |
+ | * If you already started editing but forgot to switch to a new development branch, in many cases it is still possible to just switch to a new branch after you made changes already and just follow the workflow. | ||
+ | * In case the local (master) branch is no longer usable, use these steps to reset it: < | ||
+ | git fetch origin master | ||
+ | git reset --hard FETCH_HEAD | ||
+ | git clean -df</ | ||
====== What next? ====== | ====== What next? ====== | ||
Actually, stuff like parsing & linting, merging on the server and deploying your code where it belongs (e.g. Puppet) should be automated. A basic git setup like this doesn' | Actually, stuff like parsing & linting, merging on the server and deploying your code where it belongs (e.g. Puppet) should be automated. A basic git setup like this doesn' | ||
- | Unfortunately, | + | Unfortunately, |
apps/git.1567268064.txt.gz · Last modified: 2019-08-31 18:14 by jens