it reset <id>
will takes us to the id, but will not remove the added content(Use full to remove the extra or useless commits)
git reset <id> --hard
Will reset us to the particular commit id, and delete the extra added content, to that specific time(basically take us back to the time)
git merge feature-a
Will merge the feature-a branch into the master branch(Do it from master branch)
In the case of conflict, we will need to fix the issue on master branch by deleting the comments and then git add .
and then do git commit
No need to give comment
git remote add origin https://github.com/repo
We every time need to add the URL at git push, so we can add the Alias to the particular repo, so that it will have that url every time & then we can use this nice & short method to push the code to that repo/url git push origin master
and so this will hold the url in origin and push to master git remote -v
to check the alias on the particular repo
In the case of a conflict, manually resolve the conflict in your code editor. Then run git add .
and git commit
.
To set a remote repository URL. This will let you use short commands for pushing and pulling.
To view remote URLs for your repository.
To clone (download) a repository to your local machine.
To download objects and refs from another repository without merging into your local branch.
To temporarily store changes you don't want to commit yet. You can apply them later.
To add tags to specific commits, usually for versioning.
To show various types of objects, can be used to view the changes in a commit or tag.
To set your username for all repositories on your system.
To set your email for all repositories on your system.
To set your preferred text editor for Git to use, such as Vim, Emacs, or VSCode.
To list all Git configurations.
To create a short alias for a Git command. For example, git config --global alias.cm "commit -m"
will let you use git cm "message"
instead of git commit -m "message"
.
To show changes between commits, or between the working directory and the index.
To show changes that are staged (added to index but not yet committed).
To apply changes from a specific commit to the current working branch.
To move or combine a sequence of commits to a new base commit. Useful for keeping feature branches up to date.
To use binary search to find the commit that introduced a bug.
To show what revision and author last modified each line of a file.
To view a log of where your HEAD and branch references have been.
To list all stashed changesets.
To reapply previously stashed changes.
To remove a stashed changeset.
To do a dry run and see what files would be removed.
To remove untracked files (use with caution).
To check the connectivity and validity of objects in the database.
To clean up unnecessary files and optimize the local repository.
To create a tar or zip file including the contents of a single tree from your repository.
To add a Git repository as a submodule at a specific path.
To initialize, fetch, and checkout any nested submodules for the repository.
Stay Hungry😎