[for Perforce users]
Fabio Pitino
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
<== Git
Perforce ==>
Files modified
Files staged
Files committed
cd ~/code
mkdir git-demo
cd git-demo
git init
# do your work
git add <file>
git commit -m "initial commit"
git remote add origin https://usr@stash.ges.symantec.com/scm/ccae/git-demo.git
git push -u origin master
cd ~/code
git clone https://usr@stash.ges.symantec.com/scm/ccae/git-demo.git
cd git-demo
# do your work
git add <file>
git commit -m "my first commit"
git push -u origin master
If start without a Git repository:
If you already have a Git repository
[demo]
add files
edit files
show diff (cached, unstaged)
stage
unstage
commit
push
add file1.txt
add file2.txt
commit file1.txt
commit file2.txt
git checkout -b fp-test_branch
edit file1.txt
commit file1.txt
git checkout master
edit file1.txt
commit file1.txt
# notice branch diverging when using 'git sla'
git checkout fp-test_branch
git push origin fp-test_branch
# create PR
# simulate code review
git checkout master # simulate somebody creating a conflict
git push
# show that PR cannot be merged
# Fix conflict on browser
# merge PR
git pull # on master
git branch -D fp-test_branch
.bundle
/.env
/**/.DS_Store
/data/*
/log/*
/rails/.rake_tasks*
/rails/log/*
/rails/public/scan_logs/*
/rails/ssl/*
/rails/tmp/*
/config/nginx.conf
!/log/.keep
!/rails/log/.keep
!/rails/tmp/.keep
/tags
/udo mysql*
[ Thank you ]