Git Commands
-----------------------------------------------------
Git squash:
git reset -soft d0b8a84d
git commit -m "squashed everything after d0b8a84d"
git push -f
git checkout my_branch
git reset --soft HEAD~4
git commit
git push --force origin my_branch
-------------------------------------------------------
git fetch:
is the command that tells your local git to retrieve the latest meta-data info from the original
(yet doesn’t do any file transferring. It’s more like just checking to see if there are any changes available).
git pull:
on the other hand does that AND brings (copy) those changes from the remote repository.
git config --global user.email "dharmendra.patel@myorg.ca"
git submodule:
git rm --cached file-name:
removes the file from staging area
git branch -m <old> <new>:
To rename a specific branch
git push origin -d branch_name:
Remove a remote branch
git branch -d branch_name:
Delete a branch locally
git remote add upstream git-url-from-which-fork-was-done
Comments
Post a Comment