How to create user gitignore

Issue #967 Git is a helpful tool for managing code and projects, but sometimes you want to ignore certain files or folders only on your computer without affecting everyone else. That’s where the .user_gitignore file comes in. It allows you to create personalized ignore rules for your local Git setup without changing the global project settings. gitignore Before we get into .user_gitignore, let’s quickly go over what a regular .gitignore file does....

January 30, 2024 · 2 min · 280 words · Khoa

How to work with git

Issue #531 Expand commits in Sublime Merge { "expand_merge_commits_by_default": true, "translate_tabs_to_spaces": true } local hooks .git/hooks vs hooksPath git config core.hooksPath ~/.git-templates/hooks Only hooksPath gets run. Removing hooksPath make local hooks work https://stackoverflow.com/questions/39332407/git-hooks-applying-git-config-core-hookspath Use git templates https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook Define alias in zshrc vim ~/.zshrc alias check="~/.git-templates/hooks/check.sh" source ~/.zshrc pre-commit https://itnext.io/using-git-hooks-to-enforce-branch-naming-policy-ffd81fa01e5e (feature|fix|refactor)\/[a-z0-9-]+$

December 9, 2019 · 1 min · 50 words · Khoa

How to setup multiple git accounts for GitHub and Bitbucket

Issue #514 Generate SSH keys ssh-keygen -t rsa -C "onmyway133@gmail.com" -f "id_rsa_github" ssh-keygen -t rsa -C "onmyway133bitbucket@gmail.com" -f "id_rsa_bitbucket" pbcopy < ~/.ssh/id_rsa_github.pub pbcopy < ~/.ssh/id_rsa_bitbucket.pub ssh-add -D ssh-add id_rsa_github ssh-add id_rsa_bitbucket vim ~/.ssh/config #Github (personal) Host gh HostName github.com User git IdentityFile ~/.ssh/id_rsa_github #Bitbucket (work) Host bb HostName bitbucket.org User git IdentityFile ~/.ssh/id_rsa_bitbucket Config git config --global user.email "onmyway133@gmail.com" git config --local user.email "onmyway133bitbucket@gmail.com" Read more https://medium.com/avocoders/github-and-bitbucket-accounts-in-a-same-pc-5f8c67fd89d2 https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config Updated at 2020-10-04 06:52:07

November 22, 2019 · 1 min · 72 words · Khoa

Useful git commands for everyday use!

Issue #239 Do you know that questions about git get the most views on StackOverflow? I’ve searched a lot on Google how to execute certain actions with git, and this actually slowed me down a lot. There are some actions that we tend to use a lot, so it’s good to learn them. Here are my favorites, learning from friends and internet, hope you find them useful. Before we begin, you should run git –version to check your current git version, mine is 2....

May 15, 2019 · 7 min · 1372 words · Khoa