apps:git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
apps:git [2019-09-01 11:23] – [Troubleshooting/Q&A] more specific link jens | apps:git [2020-07-21 13:35] – Extend git client configuration 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 ever wonder what branch you are on, you can just run a '' | * If you ever wonder what branch you are on, you can just run a '' | ||
* 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.txt · Last modified: 2024-05-20 13:50 by jens