See https://confluence.atlassian.com/display/BITBUCKET/Bitbucket+101
Getting Started
#### create a directory
mkdir git-repo
cd git repo
#### download a copy of the initial upload
git clone https://USERNAME@bitbucket.org/SLAC-IEPM/imc14-tulip.git
cd imc14-tulip/
#### setup account
git config --global user.name "Your Name"
git config --global user.email you@example.com
#### Simplify accessing the URL by adding an alias
git remote remove origin
git remote add origin https://YOURUSERNAME@bitbucket.org/SLAC-IEPM/imc14-tulip.git
#Now you'll just use "origin" when you want to use the URL
#### make changes
# vim ....
#### to see the status of the files (modified vs. unmodified)
git status
#### to commit files the -a option allows us to skip the explicit staging of the files. This commits the local copy
git commit -a -m "I revised section XYZ."
#### to upload the files to the server
git push origin master
#### to view commit history
git log
#miscellaneous info
#--------------------------------------------------
#do not add or delete files with simple mv or rm, instead use gitgit mv abstract.tex to anotherfilename.tex
#to add new/untracked files
git add <filename>
#then you'll upload them in the same manner
git commit -m "added file <filename>"
git push -u origin master
Using Browser to look at repository
https://bitbucket.org/SLAC-IEPM/imc14-tulip
Basic command sequence for updates
cd ~cottrell/git-repo/imc14-tulip/text
git pull origin master
ls -l
vim file
git status
git commit -a -m "comment"
git push origin master
Creating paper
cd ~cottrell/git-repo/imc14-tulip; make claen; make #This creates paper.pdf
#Then print paper.pdf
Examples
Getting Started
[cottrell@iepm ~]$ mkdir git-repo
[cottrell@iepm ~]$ cd git-repo
[cottrell@iepm ~/git-repo]$ git clone https://rlacotrell@bitbucket.org/SLAC-IEPM/imc14-tulip.git
Cloning into 'imc14-tulip'...
Password for 'https://rlacotrell@bitbucket.org':
remote: Counting objects: 66, done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 66 (delta 14), reused 0 (delta 0)
Unpacking objects: 100% (66/66), done.
[cottrell@iepm ~/git-repo]$ cd imc14-tulip/
[cottrell@iepm imc14-tulip]$ ls
IEEEtran.bst* IEEEtran.cls* IEEEtranS.bst* Makefile* bib/ figures/ latexdiff-svn.sh* paper.tex* text/
[cottrell@iepm imc14-tulip]$ ls text
01-abstract.docx 02-introduction.tex 04-tulip.docx 06-results.tex 10-conclusion.tex
01-abstract.tex 03-related_work.docx 04-tulip.tex 07-discussion.tex
02-introduction.docx 03-related_work.tex 05-vtrace.tex 09-future_work.tex
[cottrell@iepm imc14-tulip]$ git config --global user.name "Cottrell"
[cottrell@iepm imc14-tulip]$ git config --global user.email cottrell@slac.stanford.edu
[cottrell@iepm imc14-tulip]$ git remote remove origin
[cottrell@iepm imc14-tulip]$ git remote add origin https://rlacotrell@bitbucket.org/SLAC-IEPM/imc14-tulip.git
Updating
207cottrell@pinger:~$cd git-repo
208cottrell@pinger:~/git-repo$ls
imc14-tulip/
209cottrell@pinger:~/git-repo$cd imc14-tulip/
210cottrell@pinger:~/git-repo/imc14-tulip$ls
IEEEtran.bst* IEEEtranS.bst* bib/ latexdiff-svn.sh* text/
IEEEtran.cls* Makefile* figures/ paper.tex*
211cottrell@pinger:~/git-repo/imc14-tulip$cd text
213cottrell@pinger:~/git-repo/imc14-tulip/text$git pull origin master
Password for 'https://rlacotrell@bitbucket.org':
From https://bitbucket.org/SLAC-IEPM/imc14-tulip
* branch master -> FETCH_HEAD
Updating 45f54d4..3b9f84b
Fast-forward
bib/imc14-tulip.bib | 23 +
figures/Tulip_Results.xlsx | Bin 0 -> 217542 bytes
figures/land_density_all.PNG | Bin 23750 -> 95293 bytes
figures/land_density_eu.PNG | Bin 19270 -> 82715 bytes
figures/land_density_median.PNG | Bin 19650 -> 85999 bytes
figures/land_density_na.PNG | Bin 19460 -> 85598 bytes
...nkfurt1_Level3_net2.PNG => tulip-interface.png} | Bin
paper.pdf | Bin 0 -> 1533649 bytes
paper.tex | 145 +-
sig-alternate.cls | 1649 ++++++++++++++++++++
text/01-abstract.tex | 10 +
text/02-introduction.tex | 31 +-
text/04-tulip.tex | 32 +-
text/05-vtrace.tex | 29 +-
text/10-conclusion.tex | 4 +-
15 files changed, 1845 insertions(+), 78 deletions(-)
create mode 100755 bib/imc14-tulip.bib
create mode 100644 figures/Tulip_Results.xlsx
mode change 100755 => 100644 figures/land_density_all.PNG
mode change 100755 => 100644 figures/land_density_eu.PNG
mode change 100755 => 100644 figures/land_density_median.PNG
mode change 100755 => 100644 figures/land_density_na.PNG
rename figures/{ae-6-6_ebr2_Frankfurt1_Level3_net2.PNG => tulip-interface.png} (100%)
create mode 100644 paper.pdf
create mode 100644 sig-alternate.cls
215cottrell@pinger:~/git-repo/imc14-tulip/text$ls -l
total 131
-rw-r--r-- 1 cottrell sf 15148 Mar 22 11:30 01-abstract.docx
-rw-r--r-- 1 cottrell sf 3525 Mar 28 09:07 01-abstract.tex
-rw-r--r-- 1 cottrell sf 17610 Mar 22 11:30 02-introduction.docx
-rw-r--r-- 1 cottrell sf 9597 Mar 28 09:07 02-introduction.tex
-rw-r--r-- 1 cottrell sf 5350 Mar 22 14:43 02-introduction1.tex
-rw-r--r-- 1 cottrell sf 19494 Mar 22 11:30 03-related_work.docx
-rw-r--r-- 1 cottrell sf 7112 Mar 22 11:30 03-related_work.tex
-rw-r--r-- 1 cottrell sf 25106 Mar 22 11:30 04-tulip.docx
-rw-r--r-- 1 cottrell sf 13369 Mar 28 09:07 04-tulip.tex
-rw-r--r-- 1 cottrell sf 6343 Mar 28 09:07 05-vtrace.tex
-rw-r--r-- 1 cottrell sf 790 Mar 22 11:30 06-results.tex
-rw-r--r-- 1 cottrell sf 44 Mar 22 11:30 07-discussion.tex
-rw-r--r-- 1 cottrell sf 68 Mar 22 11:30 09-future_work.tex
-rw-r--r-- 1 cottrell sf 1810 Mar 28 09:07 10-conclusion.tex
[cottrell@iepm imc14-tulip]$ vim text/02-introduction.tex
[cottrell@iepm imc14-tulip]$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory"
#
# modified: text/02-introduction.tex
#
no changes added to commit (use "git add" and/or "git commit -a")
[cottrell@iepm imc14-tulip]$ git commit -a -m "I revised the Introduction to add extra features we have added (accuracy), fix some grammar etc."
[master 2a144a6] I revised the Introduction to add extra features we have added (accuracy), fix some grammar etc.
1 file changed, 5 insertions(+), 5 deletions(-)
[cottrell@iepm imc14-tulip]$ git push origin master
Password for 'https://rlacotrell@bitbucket.org':
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 873 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To https://rlacotrell@bitbucket.org/SLAC-IEPM/imc14-tulip.git
203cf3a..2a144a6 master -> master
[cottrell@iepm text]$ git pull origin master
Password for 'https://rlacotrell@bitbucket.org':
From https://bitbucket.org/SLAC-IEPM/imc14-tulip
* branch master -> FETCH_HEAD
Already up-to-date.