Good configurations
- How to Use Multiple Git Configs on One Computer
- How to manage multiple GitHub accounts on a single machine with SSH keys
How to configure git for the first time use
Configure .gitconfigure file through following commands
For name : git config --global user.name "yourname"
For email : git config --global user.name "youremail"
Commits can be pushed onto github through git push command
git push remote_name new_branch:branch_to_which_code_has_to_be_pushedConcepts
- Remove File From Git Repository Without Deleting It Locally
# For Deleting file git rm --cached file_name # For Deleting folder(-r is for recursively deleting) git rm --cached -r folder_name - what does set-upstream do in git and github(Git Set Upstream | Learn Version Control with Git)
- A good beginner friendly introduction to git that explains git with children toys : must watch
- A successful Git branching model » nvie.com
- Head always points at the the branch we are currently checked out.
- How to get updates on the remote while you have changes on the local repository too.
- Unrelated Branches : A branch points to a commit. A non-root commit has one or more parents and each parent commit has its own one or more parents. When two branches don’t have any common ancestor in their histories, they are unrelated.
- How to Write a Git Commit Message
Scenarios
How to rollback a commit without removing changes ?
Use git reset soft strategy while doing this not git reset hard Basically use the command in the following way
git reset --soft "commit_that_existed_before_my_commit"