Restoring in Git
- Git reflog: this is a permanent log of changes done in the local repository. using ref log we can reset the work done
- Using reflog we can revert deleted commits
- We have done
- reverting a rebase
- restore a deleted commit
- we have used git switch to create a branch from a commit
Tag
- Tag always points to a fixed commit
- Generally organizations create tag, when they give a release.
- There are two types of tags
- lightweight: they have just tag name
- annotated tags: here we can add additional information
- Refer Here
Fourth Area of Git = Remote Repo
- Remote Repository represents a git repo(s) where all of your will get or submit code changes for the team.
- Remote Repository is same as git repository, but it will have two extra features provided by daemon
- an endpoint to communicate
- https
- ssh or git
- user management
- an endpoint to communicate
- To run remote repos, we have two options
- self hosted git
- Git lab
- Gitolite
- Cloud hosted git
- Git lab
- Git Hub (Most popular cloud hosted git repository)
- Azure Source Repos
- AWS Code Commit
- BitBucket
- self hosted git
- The process of getting a git repository from remote to local is called as clone
- Lets setup ssh-key in GitHub
# Execute if you dont have keys
ssh-keygen
# add the ssh key to github
# navigate to folder
git clone <url>
