git Tutorial
Introduction Installing Git Understanding Git architecture Initializing the new Git respository Cloning new Git repository .git directory in Git repository Viewing Git configuration First time Git configuration Using SSH keys with Git Checking Git status Adding files into staging area in Git Committing changes to the local repository Ignoring files using .gitignore Viewing the history of commits Viewing the file contents in working directory, staging area and repository Viewing difference between files Viewing the history of files Git revert Git Reset git reflog Creating and switching to new branches in Git Viewing existing branches Merging branches Resolving conflicts Rebase Deleting branches Renaming the branch in Git Push Pull Stashing the changes in Git Tags in Git Patches in Git Creating new repository on GitHub Pushing local repository to remote repository like GitHub IntelliJ IDEAgetting back deleted commits in git
When we use git reset, some commits in the git history might be deleted. Suppose you want the changes from some of those deleted commits. Is there any solution? Yes – that’s when git reflog command comes into picture. Below image shows that we have a commit starting with Id db1a0 in our git History. Below image shows that we have deleted the commit starting with id db1a0 Below image shows that we can still view the deleted commit in git reflog. To get back the changes from that commit, we can check it out and then merge it into our branch.
Here is the output of above example.
Web development and Automation testing
solutions delivered!!