- Use the command below after modifying
.gitignore and to remove tracking files already committed before
git rm -r --cached .
- List all the files currently being tracked under the branch master
git ls-tree -r master --name-only
- Print a decorated log of branches on command line
git log --all --decorate --oneline --graph
Continue reading “GIT hacks”
If you are a frequent user of github, you might have come across github pages, a service to publish websites. Github pages are often helpful to explain/showcase your small projects with a neat webpage for each repository.
- All you need is to include a markdown in your github repository by name
INDEX.md and github pages will generate a webpage from it. There are many options as mentioned in documentation.
- 3 easy steps to setup a webpage for a project.
- If you are using
ipython notebook, download your notebook as a markdown file
- place “markdown file+resources” in your github repository inside
docs folder (create one if doesn’t exist).
- Rename the markdown as
docs/INDEX.md to make it the default loader. Your project website is ready at the link “[usename].github.io/[projectname]”
You can even use this to publish a Web-resume (get a resume template from w3schools).
git has undoubtedly become the version control standard in the industry and this skill is inevitable for collaboration across multiple teams. Even solo projects can use
git to streamline development and experiment with multiple branches. This post is a small starting point for newbies.
git documentation can be overwhelming for most newbies with lots of options/commands. In reality, most developers end up using a handful of key features.
[Since it is always hard to remember], I have this cheatsheet (atlassian) posted on my desk.
Another nifty little command on MAC terminal to get the graphical repository browser :
Git Commit messages
Git commit messages are terse notes about the changes made since last commit. ideally messages are to follow the structure given below and It’s always a good practice to follow this guide for commit messages: GIT Style Guide
Check out these awesome websites which can teach you
- learngitbranching.js.org (highly recommended)
- Git-IT (Git is an excellent learn by doing cross-platform project)
Some useful links for beginners to get involved
- Medium blog for first timers