Skip to content

Instantly share code, notes, and snippets.

@tidalgo22
Last active April 17, 2018 06:22
Show Gist options
  • Save tidalgo22/76e6dc503c5ead150eede67ab72b5be0 to your computer and use it in GitHub Desktop.
Save tidalgo22/76e6dc503c5ead150eede67ab72b5be0 to your computer and use it in GitHub Desktop.
Git commands
git clone https://github.com/.....
git add index.html - adding the file for commit.
git status - checks the changes
git commit -m "added index.html"
git push - will sync it to your repository
git pull - pulling down the github files to your working directory.
git reset <file or dir> - reset add
git reset - reset all add
Remove directory from git and local
git rm -r one-of-the-directories
git commit -m "Remove duplicated directory"
git push origin <your-git-branch> (typically 'master', but not always)
Remove directory from git but NOT local
git rm -r --cached myFolder
git branch - list all branch
git branch branch_name - create new branch
git checkout branch_name - switch to another branch
http://krishnaiitd.github.io/gitcommands/git-add/
Errors:
git permission denied <username> unable to access 403.
-To fixed on windows delete the credentials in your windows credentials list.
Go to Credential Manager
Go to Windows Credentials
Delete the entries under Generic Credentials
Try connecting again.This time , it should prompt you for the correct username and password.
https://drive.google.com/open?id=0B3QgisC9hJPjVGd0MjU5VHI0RzA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment