If you made an error while typing the branch name or decided to change the branch name after pushing it to the remote repository, there is a method to rename the branch both locally and remotely.
Git: Move a Folder From One Repository to Another Without Losing Git History
Git commit history is extremely useful. It serves as additional documentation of code with context. This article presents a step-by-step guide to move a folder from one Git repository to another with full revision history intact.
Git Cheatsheet – Frequently Used Git Commands
A cheatsheet is a crisp set of notes, or commands used as a quick reference. Git is the most popular modern version control system (open-source and free). The below table contains the list of most frequently used Git commands.
Update Cached Credentials in Git Repository
If you have cached your git credentials for a repository or globally, a couple of scenarios might arise: 1. Cached credentials need to be updated for a single repository or globally 2. Cached credentials need to be removed for a single repository or globally.
Git – Refresh a File or Folder from the Remote Branch
When you have messed up a file or made temporary changes locally (e.g. for debugging) and you want to get rid of the local changes, there is an easy way out.
Git – Refresh Feature Branch from Master – Rebase Vs. Merge
While working on a feature branch, often you need to get the latest changes from master (contributed by other developers) to your feature branch to test your code with changes made by other developers.
Git – Working with Multiple GitHub Accounts
When you have messed up a file or made temporary changes locally (e.g. for debugging) and you want to get rid of the local changes, there is an easy way out.
Git – Globally Ignore Certain File Types
ll show you the steps to use a global .gitignore file to apply the exclusion pattern to all your repositories. Create a new file named .gitignore-global (or any other name you like) at the user’s home directory or any other directory of your choice. Add all required exclusions to this file just like a normal.gitignore file.
How To Cache Git Credentials
If you are using password-based authentication to authenticate yourself to the Git server, it might prompt you to enter your password every time you execute git commands. To avoid that you can configure Git to cache your credential.
Change Author and Commit Message Before or After Push to Git
After committing a change, you realized that either the author is not appearing correctly or the commit message needs a change. There are two likely scenarios and in each scenario, we’ll explore how to change the commit metadata.