queirozsc
8/12/2017 - 4:34 PM

[git] #git

[Manipulando GitHub] #git

# Add untracked files + commit changes + push to server
git add -A && git commit -am 'Message' && git push ;
# Create a new branch
git branch experimental ;
# List all existing branches (note: asterisk marks the currently branch)
git branch ;
# Switch branch
git checkout experimental ;
# Merge the branch into master
git merge experimental ;
# View conflicts
git diff ;
git commit -a ;
# View graphic representation
gitk ;
# Delete a branch ensuring that the changes are already in the current branch
git branch -d experimental ;
# Destroying a branch
git branch -D crazy-idea ;
# Clone your CodeCommit repository to a local repository
git clone [CloneUrlHttp] [localrepository]
# View the history of changes
git log ;
# Complete diffs at each step
git log -p ;
# Overview of the change
git log --stat --summary ;
cd project
git init
git add .
git commit
# Commit to your repository
git push origin
git checkout cats.html index.html ;
# Inspect what others changed
git fetch remote-repo master ;
git log -p HEAD..FETCH_HEAD ;
gitk HEAD..FETCH_HEAD ;
gitk HEAD...FETCH_HEAD ;
# Fetch changes and merging into the current branch
cd project ;
git pull remote-repo master ;