- How to set multiple ssh keys
- how to set multiple gits to one repo
- Editing commit messages already pushed
- Styling Commit messages
- Udacity Style Guide
- Not Fork, duplicate
- sh option to expand variables shopt -s direxpand
https://www.udacity.com/wiki/w/image/view?key=agpzfnVkYWNpdHl1chYLEglXaWtpSW1hZ2UYgIDgioaL4goM
-set-up-git -generating-ssh-keys -fork-a-repo
-switching-branches-without-committing
installation: https://www.udacity.com/wiki/ud775/install-git
sublime: https://www.udacity.com/wiki/ud775/sublime
setting up git workspace: https://www.udacity.com/course/viewer#!/c-ud775/l-2980038599/m-2955818665
about bare repositories: http://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/
git clone https://github.com/YOUR-USERNAME/Spoon-Knife
git config --list
https://help.github.com/articles/caching-your-github-password-in-git
ssh-agent bash
ssh-add
[ENTER YOUR PASSPHRASE...or not]
mkdir <projectname> #CRIA DIRETORIO PARA GUARDAR DADOS DO GIT
cd <projectname>
git init #INICIA GIT NO DIRETORIO
git remote add origin [email protected]:codexico/tutorial-github.git #CLONA REPOSITORIO EXISTENTE
git clone -b <branch> <remote_repo>
git pull origin [BRANCH NAME] # BAIXA DADOS
source: http://stackoverflow.com/questions/4114095/revert-to-a-previous-git-commit
####Temporarily switch to a different commit git checkout -b old-state [ID_git]
####Undo published commits with new commits # This will create three separate revert commits: git revert 0766c053 25eee4ca a867b4af
# It also takes ranges. This will revert the last two commits:
git revert HEAD~2..HEAD
# To get just one, you could use `rebase -i` to squash them afterwards
# Or, you could do it manually (be sure to do this at top level of the repo)
# get your index and work tree into the desired state, without changing HEAD:
git checkout 0d1d7fc32 .
# Then commit. Be sure and write a good message describing what you just did
git commit
source: Udacity and other
git checkout -b [branch name] --> cria e muda para outro branch
git checkout [branch name] --> mudar para outro branch
git add . ou
git add [arquivo]
git commit -m "<MENSAGEM SOBRE ALTERACAO>"
git push origin [branch]
git fetch origin->>atualiza projeto local
git status
git log --stat
or git log -n 1 -->> show the newest log
####To see the changes made bvefore and after a branche was created git log --graph --oneline master [branch]
git config --global color.ui auto.
https://gist.github.com/trey/2722927
-
on project folder in your DropBox:
git init --bare ".git"
-
on your "local" git folder:
git clone C:/Path To your DropBox/and/your/project/.git touch README.md git add . git commit -m "Initial commit" git push origin master
-
Obs: To render github markdown files offline, use:
source: http://stackoverflow.com/questions/9843609/view-md-file-offline
pip install grip
git diff [id alteracao 1] [id alteracao 1]
git diff --> Para qualquer diferença
git diff --staged -->Para ver as diferenças que estão na stage area
para serem comitadas
show commit_id --> Comparing a commit to its parent
git reset [filename]
git reset --hard -->To discard any changes in your staging area
git rm --cached [filename]
git checkout master
-
If happens any problem when you try to merge, to revert back:
git merge --abort
-
Merge branches
git merge [branch 1] [branch 2]
-
After merging, you don't need the brach anymore, then:
git branch -d [branch1] (d of delete)
-
After some conflict was resolved, you have to add to the stage
git add [filename]
git remote add origin [git url]
!!origin is a standard name to your remote repository
git remote
or git remote -v (for verbose)
git push [my remote] [my branch]
git push origin master
git clone [github url]
git branch -a
add CONTRIBUTING.md