Skip to content

Instantly share code, notes, and snippets.

@iamshreeram
Last active August 3, 2019 20:42
Show Gist options
  • Save iamshreeram/6eee18e27019805e950278201a87f3b2 to your computer and use it in GitHub Desktop.
Save iamshreeram/6eee18e27019805e950278201a87f3b2 to your computer and use it in GitHub Desktop.
Git commands for clone from existing repository

Below are list of commands to modify the existing repo and push back the changes

git clone <https://remotegiturl.git>
cd <git-project-name>
git config credential.helper store
git add *
git commit -m "<Updating Comments for modified file>"
git push origin master

Below are list of commands to fix SSL issue in windows when pushing the changes to repo

git config --global http.sslBackend "openssl"
git config --global http.sslCAInfo "C:\Program Files\Git\mingw64\ssl\cert.pem"

Below are list of commands to modify a forked repo and push back to your repo

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
# Add remote from original repository in your forked repository:
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# Updating your fork from original repo to keep up with their changes:
git pull upstream master
git push

Changing user name and password

git config --global credential.helper osxkeychain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment