With the UK General Election polls now open I thought I would deviate from technology and share my thoughts.
If you’ve already sent off your postal vote, well done! If not, go and vote. If you’re not sure who to vote for then here is my last word on the subject: None of us decide where we’re born or who we’re born to. You could have been born to a drug addict in a rundown estate in London. You could have been born into aristocracy. You could have been born a Muslim in the streets of Syria. You could have been born in a leafy middle class estate in Surrey. The fact that you’re reading this makes me guess that you were probably born into a pretty good start. You didn’t choose that. It was blind luck. Now use your vote in way that shows you appreciate how lucky you are and try and help those not so lucky. They didn’t choose their life. Labour, for the many, not the few.
It’s been a while since my last post, but now I’m fully emersed in learning .NET Core I’m sure I’ll start to post more regularly again. For my first trick, an aides-memoires on getting the .gitignore file to work. Here goes…
I normally use GitHub (or other git-based systems) as my source code repository when writing code in Visual Studio. I really like the fact that I can use the .gitignore file to prevent all the chaff that Visual Studio creates from being sent to the repository. For example, the ‘bin’ and ‘obj’ directories, and all the temporary solution files Visual Studio creates that have no business being in a source code reposity. A good rule of thumb is not to allow any generated files to be commited. They can be re-generated at any point so committing them just bloats commits and slows things down.
However, I often find that if I make changes to the .gitignore file in an established project these changes are not honoured in subsequent commits. Executing the the following commands in Git bash solves this:
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
Now, back to my .NET Core learning…