How to Reset Submodule to Checkout State in Git
To reset the submodule: move to the local repository, go to the submodule directory. Reset the submodule directory and checkout the state of the cloned repository.
Read MoreTo reset the submodule: move to the local repository, go to the submodule directory. Reset the submodule directory and checkout the state of the cloned repository.
Read MoreTo make amazing commits using “git add –interactive”, make files and view status. Then, use the “git add –interactive” command to add files and perform changes.
Read MoreThe “git log” command can be used to create work reports along with different options, such as “–author”, “–since” and “–until” options.
Read MoreIt is impossible to change Git parent branch. However, “git merge” and “git rebase –onto” commands are used to combine both branches to behave like a parent.
Read MoreFirst, make local repository>Generate files>Track files>Commit changes>Sign in to GitHub> Make new repository> Clone remote repository>Add remote> Push changes.
Read MoreTo create an alias for the Git command, use the “git config –global alias” and specify the alias name for the Git stated command.
Read MoreThe “git stash” command is used to temporarily save uncommitted changes that users made in their working copy, then they can easily work on something else.
Read More“git add ” command is used for tracking a single file and “git add .” command is used for staging multiple files simultaneously in Git staging index.
Read MoreTo show what a particular commit did, first, copy the desired commit ID. Then, run the “git show ” or “git diff ^!” command.
Read MoreThe “git revert” command is used for removing the changes to commit history by taking the desired commit id and reverting the made changes from that commit.
Read MoreThe “git restore” command is used for discarding the most recent committed changes and removing the tracked local changes.
Read MoreA fork is a copy of a Git remote repository. Forking is a concept in Git used to make contributions to an open-source project.
Read MoreTo push to a private repository, firstly, add the remote URL and run the “git push origin master” command in the Git terminal.
Read MoreTo ignore a tag using the “git describe” command, different options can be utilized with it, such as the “all” option or the “–always –exclude ‘*’” option.
Read MoreTo switch branch and ignore changes without committing, different methods can be used, such as saving changes in the stash or forcefully switching branches.
Read MoreTo update Git password through Windows generic credentials, open Control Panel>Credential Manager>Windows Credentials>Generic Credential>Edit.
Read MoreTo un-initialize the Git repository, first, list all its content, including hidden, and then execute the “rm -rf .git/” command.
Read MoreTo update and commit only file permissions using Git version control, the “git update-index –chmod=+x ” command.
Read MoreTo modify the old commit message by utilizing the ‘git rebase’, first, run the “git rebase -i HEAD~2” command and then use the “git commit –amend” command.
Read MoreTo create a branch in Git, the “git branch ” command can be used and for merging branches, utilize the “git merge ” command.
Read More