- http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-windows.html#setting-up-ssh-windows-keys-windows
- http://docs.aws.amazon.com/codecommit/latest/userguide/getting-started.html#getting-started-permissions
- http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli-codecommit.html
- http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-share-repository.html
- http://stackoverflow.com/questions/1125968/how-do-i-force-git-pull-to-overwrite-local-files
- http://stackoverflow.com/questions/18137175/in-git-what-is-the-difference-between-origin-master-vs-origin-master
- http://stackoverflow.com/questions/292357/what-is-the-difference-between-git-pull-and-git-fetch
- https://www.atlassian.com/git/tutorials/syncing
- https://help.github.com/articles/fetching-a-remote/
- https://www.atlassian.com/git/tutorials/undoing-changes#git-clean
The git remote command is really just an easier way to pass URLs to these "sharing" commands.
When you clone a repository with git clone, it automatically creates a remote connection called origin pointing back to the cloned repository.
The git fetch command imports commits from a remote repository into your local repo. The resulting commits are stored as remote branches instead of the normal local branches that we’ve been working with. This gives you a chance to review changes before integrating them into your copy of the project.
git diff myfile.js
git fetch origin
git diff --name-only master origin/master
git checkout -- myfile.js
git fetch --all
git reset --hard origin/master
git pull origin master
git pull origin master
git pull --all
git fetch origin master
git merge origin/master
git push origin master
git remote add origin ssh://git-codecommit.us-west-2.amazonaws.com/v1/repos/portal
- SSH Key
- Create SSH Key
- Basic Commands
- Using Git
- Checkin
- Git add
- Video
- Git Tutorial
- Try Git
- Create password with Google Account
https://git-for-windows.github.io/
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
####1. Set up profile
git config --global user.name "YOUR_USERNAME"
git config --global user.name
git config --global user.email "your_email_address@example.com"
git config --global user.email
git config --global --list
ssh-keygen -t rsa -C "your_email_address@example.com"
Must use the same email as in step 1
Copy the SSH key by running this in windows cmd
type %userprofile%\.ssh\id_rsa.pub | clip
####2. Clone a project
git clone https://project_url
####3. Switch to branch
git checkout branchname
git checkout -b branchname //create a new branch and switch to it
####4. Get the changes
git fetch remote-branch-name
####5. Merge master to current branch
git merge master
####6. Pull is same as fetch + merge
git pull origin branch-name
or
git pull --all
####7. Stage changes
git add -A
####8. Commit changes
git commit -m "commit message"
####9. Push changes
git push origin branch-name
###10.
git remote -v
###11. Tagging
git tag -a 1.0 -m "my and portal2 1.0"
git tag
git show 1.0
git push origin 1.0
git checkout -b version1 1.0
https://stackoverflow.com/questions/2007662/rollback-to-an-old-git-commit-in-a-public-repo
git checkout 552d59ba12cfc0373ff365e83dfec7a481312917 .
Dot at the end!!!
fatal: reference is not a tree: do a git pull --all first.
###12. Reset
git reset --hard
Switch between SSH and HTTPS