Presentation is loading. Please wait.

Presentation is loading. Please wait.

L – Modeling and Simulating Social Systems with MATLAB

Similar presentations


Presentation on theme: "L – Modeling and Simulating Social Systems with MATLAB"— Presentation transcript:

1 851-0585-04L – Modeling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB Lecture 2 – Let’s GIT started: local operations Karsten Donnay and Stefano Balietti Chair of Sociology, in particular of Modeling and Simulation © ETH Zürich | © ETH Zürich |

2 Let’s Git Started: local operations
Let’s Git Started: local operations In this mini tutorial you will receive the basic knowledge to work with GIT in your local machine GIT is a great tool when combined with an online repository, but this is the topic of next week.

3 Let’s Git Started: local operations
Let’s Git Started: local operations GIT is free, open source software. Works from GUI and from terminal (command-line) On the Lab machines you can launch it with: GIT Bash (Windows) git (Linux – command line only)

4 Let’s Git Started: command line ?!??
Let’s Git Started: command line ?!?? Don‘t panic! You need just three commands: (but you can learn more...) Change directory: cd List files in a directory: ls Create a new directory: mkdir <name_of_dir>

5 Let’s Git Started: initialization
Let’s Git Started: initialization Open a terminal or GIT Bash. Set the language to English (if you like) Browse to the directory with the project template files. Initialize your first GIT repository $ export LANG=en_us $ cd /path/to/your/files/ $ git init

6 Let’s Git Started: introduction
Let’s Git Started: introduction Introduce yourself to GIT.

7 Let’s Git Started: introduction
Let’s Git Started: introduction Introduce yourself to GIT. $ git config --global user.name "Your Name" $ git config --global user.

8 Let’s Git Started: give GIT tasks
Let’s Git Started: give GIT tasks Tell GIT which files you would like to track for changes. Take a snapshot (commit) of all tracked files $ git add file1 file2 $ git add . $ git commit –m “This is my first commit”

9 Let’s Git Started: do your job…
Let’s Git Started: do your job… Do any modification to the content of the files. Get the update of the status of the repository $ git status Visualize the differences in the terminal. Visualize the differences in a GUI client $ git diff $ gitk ; git gui ; gitx (for MAC)

10 Some hints how to use GIT for your code
Some hints how to use GIT for your code Commit often. Use appropriate commit messages. Do not rename the file names manually (use git mv) New files are not automatically indexed, must be added. Careful with git add . Rather choose the files: git add file1 Write a .gitignore file or use git ignore for files that you never want to commit (e.g. big datasets)

11 References Git Home Page: http://git-scm.com/
References Git Home Page: Git General Info: Github Home Page: GitX (a gui for OS X): Git in 5 minutes: Git Book


Download ppt "L – Modeling and Simulating Social Systems with MATLAB"

Similar presentations


Ads by Google