Git. It is easy to shoot your foot off with git, but also easy to revert to a previous foot and merge it with your current leg.

Size: px
Start display at page:

Download "Git. It is easy to shoot your foot off with git, but also easy to revert to a previous foot and merge it with your current leg."

Transcription

1 The ECE297 Quick Start Guide Series Git It is easy to shoot your foot off with git, but also easy to revert to a previous foot and merge it with your current leg. Jack William Bell I name all my projects after myself. First Linux, now Git. Linus Torvalds 1 What is Version Control? Version control 1 describes a software tool that manages the source code of a project being developed by one or more programmers. The core objective is for it to be easy for multiple people to work on a project and not get in each others way. This is typically provided via a history of changes made to all files in a project and the ability to review and analyze this history. Real-world software projects have a lifetime of years or decades, and usually dozens of programmers working on the same project, which may grow to include millions of lines of code and thousands of files. It becomes effectively impossible to make changes to such large projects without some sort of automation and so, version control. Even for your project in ECE297, you will soon find that using version control allows you to efficiently collaborate with your group members and effortlessly keep track of changes made to your code base. There might be the occasional complication, but don t give up on it! The TAs during tutorials and though Piazza will be glad to help you understand and fix any problems. 2 Git, At a High Level All version control systems have a few basic actions: get the latest changes from your colleagues; make changes to your local copy of the project; package the changes for sharing; and, share your changes with your colleagues. Some version control systems combine some of these actions, but Git is very flexible, allowing you to do each of these actions separately.in Git terminology, the get action is known as pulling, the make changes action is just editing local files, the package action is known as committing, and the share action is known as pushing. With four basic actions comes four basic locations for your changes, and four commands to move changes from one place to another, visualized in Figure 1. Three of the four commands in the figure have been mentioned, save for add. This command selects changes from your local files for commit to package. Also not mentioned so far is this.git directory a hidden folder at the root of your local repository that stores information about it for Git to use. The remainder of this guide will walk you through actual typical usage of these commands and more! via completing some tasks of Milestone 0, then moving on to how to work with others. 1 Also known as revision control, or source control 1

2 Working Directory Staging Area.git Directory Remote Repository add commit push pull Figure 1: stages diagram, with commands that move changes between each stage 3 To Finish Milestone 0! Before proceeding, be sure to have finished the Milestone 0 handout up to where you are instructed to read this guide. 3.1 Setting Up Git Now that you have a basic understanding of some of Git s concepts, lets move on to actually using the commands. All Git commands are of the form git sub-command --command-options They also all accept a --help option (exit by pressing q). Finally, running git --help offers a quick listing of the available commands, only some of which will be covered here. Before we get started, lets set your name and properly. Run the following commands, with the place-holders replaced with your info. 1 > git config --global core.editor nano # set the editor to a simple one (optional) 2 > git config --global user.name "Your Name" 3 > git config --global user. "your. @mail.utoronto.ca" 3.2 What Changes Have I made? Change directory to your Milestone 0 code, 2 and run git status 1 > cd ~/ece297/work/milestone0 2 > git status 3 On branch master 4 Changes not staged for commit: 5 (use "git add <file>..." to update what will be committed) 6 (use "git checkout -- <file>..." to discard changes in working directory) 7 8 modified: main/src/main.cpp 9 10 no changes added to commit (use "git add" and/or "git commit -a") This status tells you several pieces of information, and is very useful to get a quick glimpse of the current state of your local repository. It is always safe to run, and as you can see from the 2 Git can be used from any directory in your local repository, but the commands in this guide assume you are here Page 2 of 19

3 output, offers suggestions for how to accomplish common tasks. If you are doing something and not sure what to do next, try running git status Let s look at the output. First, it tells you that you are on a branch 3 called master. Branches can be thought of as a name for a sequence of commits, and git allows for many of these, but covering them is beyond the scope of this guide. Next, it gives you a summary of the changes that have been made to files in this repository. Specifically, these are the differences between the Working Directory and the Staging area. Finally, it would tell you what you have added to the Staging Area, but at this time, there is nothing. Lets say you want to see exactly what changes you made. Run the command 1 > git diff You should now see a line-by-line detailed list of changes to the working directory. Press q to exit, or h for help. 3.3 Making A Commit & Sharing It With Your Colleagues You may have noticed the suggested commands printed by git status - let s try one of them now. Add the changes you made to main.c to the Staging Area by running 1 > git add main/src/main.cpp Now run git status again. It should now report that your main.c is to-be-committed. This means that the changes to it have been moved to the Staging Area. Note that a file can have changes in the Staging Area and not, in which case it will show up in both lists. Only the changes in the Staging Area will be committed. The more official name for this Staging Area is the Index. We ll use this term from now on. Try running git diff again. What do you see? Recall that by default it shows the difference between the Working Directory and the Index. Now that we re almost ready to make a commit, it s a good idea to know what exactly is going to go into the commit. This can be done by adding an option to the diff command: take a good look at the changes you have added to the Index, by running 1 > git diff --cached We re almost ready to make a commit, but let s talk about commit messages for a moment. A good commit message has a brief and meaningful first line (think of it as an subject 4 ) Ideally, you should commit often enough so that it is easy to come up with a terse subject. If you d like to complement your subject with a body, see Section 8.1. Now, lets make the commit. 1 > git commit -m "Modified main.cpp by computing a new center of mass with 2 a new polynomial." Since you ve made a commit, let s share it with your colleagues. 5 This is also necessary for submitting, and to keep things simple, always push right after committing. 3 yes, of a tree data structure, though the branches are allowed to merge back together 4 Git was originally developed for use with the Linux kernel s source code, and that community generally sends commits around by , so the commit message is intended to literally be an subject and body. 5 Imaginary ones, for this milestone Page 3 of 19

4 1 > git push If that command succeeded, then you have published the commit you just made to the Remote Repository. Up to here is sufficient to complete the Milestone 0 work, but is insufficient for working with others for the rest of the semester, hasn t mentioned any time-saving tricks, and hasn t provided the answers to all the questions a TA might ask you. 4 Essential Extras 4.1 Viewing Old Commits Run this command to see the id (long hex numbers) and message of the commit you just created, as well as the same information for all previous commits (press q to exit). 1 > git log 2 commit af4297fe811a1c2ae67f796d6caefb8f474ca435 3 Author: My Name <my. @mail.utoronto.ca> 4 Date: Fri Nov 23 16:14: also print the first moment of x+2y^2+3z^3 over [0,5)x[0,5)x[0,5) 7 8 As requested by the handout. Passes tests for correct output now. 9 Created a new Polynomial, called compute_center_of_mass on it, 10 and printed using same settings as first 1st moment commit d6bac6e26bae3bac4eaa04e8fabd128107fe389e 13 Author: My Name <my. @mail.utoronto.ca> 14 Date: Fri Nov 23 15:49: Initial Milestone 0 commit by /cad2/ece297s/.public/bin/ece297init for namemy1 To view a file as it was committed at a particular commit, use show (press q to exit): 1 git show d6bac6:./path/to/file.c # use the ID you are interested in. The first 4-8 chars is enough. To see the difference between the current commit and another, use diff again. 1 git diff d6bac6 # use the ID you are interested in. The first 4-8 chars is enough. 4.2 Checkout Consider a situation where you want to see how the state of the code was at a certain commit (after committing and pushing new changes). This can be achieved by 1 > git checkout <commit_id> # Replace <commit_id> by the desired ID from git log You can also do this for only certain files or directories by: 1 > git checkout <commit_id> path/to/file/or/dir # Replace <commit_id> by the desired ID from git log Page 4 of 19

5 While you can commit new changes from this state, we would recommend not to do so as this would create what we call branches, which are outside the scope of this course and may lead to messy behaviors, especially when working with others. To go back to the latest version, type 1 > git checkout master 4.3 Reverting committed files In case you want to cancel certain commits you made where you discovered that the new changes has bugs for example, you can use the following command: 1 > git revert <commit_id> The revert command creates a new commit that inverts the changes in the commit specified by <commit_id>. From this state, you can continue working on your code as if <commit_id> didn t happen. You can also specify files and/or directories to be the only ones to revert by adding <path/to/file/or/dir> to the above command. 4.4 Reverting uncommitted changes To permanently obliterate all uncommitted changes to a file, or all files in a directory (recursively), run: 1 > git reset path/to/file/or/dir # just in case you added it 2 > git checkout path/to/file/or/dir 5 Working With Others 5.1 Getting Your Colleagues Changes Consider the situation where your colleague has been working at the same time as you, has made and pushed a commit, and you would like to update your working directory with their changes. To accomplish that, and update your local repository and working directory, you can run the following 1 > git status # do I have any uncommitted changes? 2 > git commit # commit if you have any 3 > git pull -r This performs a special type of merge called a rebase, which makes sure that your project history is very simple. Explaining exactly what it means (or how Git works in general) is beyond the scope of this guide. 5.2 Conflicts After Pulling Consider another situation where your colleague happens to make commit around the same time as you, but pushed it before you did.what should happen when you try to push? Well, the push Page 5 of 19

6 command will fail! 6 You can use the same sequence of commands as above (Section 5.1) to resolve this situation. However, the pull -r may fail when the commit you made conflicts with theirs. When this happens, git brings you into a special mode that allows you to fix your commit, like in the following session. 1 > git pull -r 2 First, rewinding head to replay your work on top of it... 3 Applying: I, your colleague, changed file.c. This is the commit message 4 Using index info to reconstruct a base tree... 5 M path/to/file.c 6 Falling back to patching base and 3-way merge... 7 Auto-merging path/to/file.c 8 CONFLICT (content): Merge conflict in path/to/file.c 9 error: Failed to merge in the changes. 10 # oh, no. There s a conflict between our changes in file.c 11 > cat path/to/file.c # let s take a look at that file 12 more code 13 more code 14 <<<<<<< HEAD 15 code added by you 16 ======= 17 code added by colleague 18 >>>>>>> I, your colleague, changed file.c. This is the commit message 19 more code 20 more code 21 > nano path/to/file.c # resolve all the merge conflicts by editing the file to look like you want it to 22 > git add path/to/file.c # mark it as resolved 23 > git status # are all the conflicting files marked as resolved? 24 > git diff --cached # make sure everything looks good. Make sure to check if the code builds and works. 25 > git rebase --continue # tell git that you are done If you re not sure what to do, run git status for hints. If you are really confused, and just want to start over, run git rebase --abort and start again from the top, at git pull -r This process actually works with multiple non-pushed commits, but for simplicity, try to avoid that situation by always pushing after committing. If that is the case though, then you may have to resolve multiple conflicts and run git rebase --continue multiple times. You can also use the Netbeans conflict resolution tool, though you will have to invoke it yourself. (Section 9.7) 6 Summary, Tips & Tricks If you are interested is using Netbeans Git integration, see Section 9. 6 What are you trying to do? overwrite your colleague s work? :) Page 6 of 19

7 6.1 Command Summary git command add file reset file reset commit revert c0mm1t push pull -r rebase --continue log show c0mm1t checkout c0mm1t checkout master Summary Add changes from a given file to the Index Remove uncommitted changes to a given file from the Index Remove all uncommitted changes from the Index Package the changes in the Index together, with a message Revert changes of a commit from current version Share your commits to the Remote Repository Get commits that your colleagues have shared Tell git that I m done fixing this commit Look at the commit history View a commit Change to the given commit id Go back to the most recent version you have in the Local Repository 6.2 Tips git command git add. Explanation add accepts directories, so this is a quick way to add all files in a the current directory, and all subdirectories, recursively. git add -u This adds all files that have modified status. Does not add new files you still have to add them file-by-file, or use git add. git add -up git commit -a git blame file git remote -v git clone url git init git config --global alias.st "status" git config --global alias.dc "diff --cached" git rm file git mv src dest gitk --all Interactively adds all modified files to the Index. The -p option also works for several command like stash, reset and checkout. Just like running git add -u then git commit, but in one command. Note, there s no opportunity to run git diff --cached See who changed what lines of a file, when, and what commit list information about the remote repository create a new working copy of the repository at the given url or path. Note: the remote repository for this new working copy is the repository at the url given, so use the url/path from git remote -v in the repository created in your home directory by ece297init create a new, empty, git repository in the current directory Now, you can type git st instead of git status (one line) Now, you can type git dc instead of git diff --cached (one line) Deletes the file and adds the "removal" to the Index. (It s difficult to refer to deleted files) Renames the src file to dest, and adds this to the Index Visualizes your local git repository Page 7 of 19

8 git citool A graphical tool for making commits. Makes it easy to only commit parts of a file. 6.3 Flows Described In This Guide The flows described in this document are good practices for using git with a single branch. Use this section as a quick reference for them. They will work well enough for your small ECE297 team and project, but is likely not exactly what will be used on a project with more people, say, at a company that uses Git. Git is a powerful and flexible tool, of which we have only touched the surface Making A Commit (Section 3.3, plus a tip from Section 6.2) 1 > git add -u # add all modified files 2 > git add path/to/file.c # add any new files 3 > git diff --cached # look at the changes 4 > git commit # package with a message 5 > git push # share it with your colleagues Getting Your Colleagues Changes (Section 5) 1 > git status # do I have any uncommitted changes? 2 > git commit -m "work in progress" # commit any changes if you have some 3 > git pull -r If the git pull -r failed, fix stuff (Section 5.2), then run 1 > git rebase --continue 7 See Also Pro Git (book) If you want to know more details. Especially sections 2, 3, 5 & 8. A glossary of terms Also available via the command man gitglossary Git+Netbeans docs Official guide for the Git support in Netbeans. A supplement to Section 9. Page 8 of 19

9 8 A Few Extra Things Not completely necessary, but might be useful; This section contains some things you might want to do, but are not in the minimal necessary set of tasks for using Git. The TAs shouldn t ask about anything in here. 8.1 Longer Commit Messages If you run git commit (ie. no -m) then a command-line editor will be brought up. You should now type your message, then press control-o (and then the enter key) to save, and control-x to exit. Earlier we mentioned that commit message is sort-of like an . Just writing a commit subject is fine most of the time, but sometimes you will want to add more explanation, like the body of an . To do this, add an empty line, and then type the body. For example: 1 Modified main.cpp by computing a new center of mass with 2 a new polynomial. 3 4 Added a new polynomial g(x, y, z) to main.cpp, computed center of mass 5 of a cube with (x, y, z)=(5, 5, 5) and mass-density distribution g(x, y, 6 z), and then printed the result. 8.2 Looking at Old Commits 1 > git log # find the commit id of the "Initial Milestone 0 commit". Copy it with ctrl-shift-c. 2 > git commit -m "work in progress" # make a pristine local repository 3 > git checkout c0mm1t_1d # paste (ctrl-shift-v) the copied commit it in place of c0mm1t_1d 4 # Take a look around, and when you are done, run the next command 5 > git checkout master # remember this name from before? this brings you back to where you were It s always a good idea to have a pristine repository before jumping around to different commits otherwise, things might get very confusing. Or, git might not even allow you to change, because if you did, you would loose your uncommitted work! 8.3 Removing Changes From the Index If you ve added something to the Index that you don t want to commit, there a command for that. 1 > git reset path/to/file.c Or, run it with no file argument (just git reset) to clear the Index completely. 8.4 The Stash A common situation is that you have made some changes, and you think you ve introduced a bug, but you re not sure what the old behavior was. Or, your colleague says that they have found a bug, and you want to quickly investigate if only you could stash your changes away somewhere. Other people have thought this was useful, and Git has a mechanism for this: the stash. Page 9 of 19

10 1 > git status # assume you have some uncommitted changes 2 > git stash push 3 > git status # will show no changes! 4 > git stash pop 5 > git status # your changes will be back 8.5 Fixing and Undoing Commits Only do these things to commits you haven t pushed! If you forgot to add something, but don t want to make another commit, or you just made a typo in the message, run this: 1 > git commit --amend If you didn t mean to make a commit at all, run this: 1 > git reset HEAD^ Page 10 of 19

11 9 Netbeans Integration for Git Some may be more comfortable using a graphical interface, or maybe can t be bothered to memorize so many funny-named commands.for those people, there is a reprise: Netbeans has some graphical tools for using Git. Don t dismiss the command-line entirely though, it is the only thing that will be always be there for you to use, no matter your working environment. Finally, note that switching between using the Netbeans interface, and the command-line will work seamlessly. The most reliable way to use this integration is by right clicking on a file or folder in the Projects panel that you want to do some operation on, and choosing an operation from the Git sub-menu. Often you want to commit all changed files, or add all file changes, or do something else to the entire codebase, so usually you should specifically right-click on the project node (the one with a gear-in-box icon). The operations are also available from the Team menu, but you must select the file/folder/project in the Projects panel before doing anything. Armed with the prior sections information, many of the various sections and options should make some sense, but let s go through how to so some specific things. In general, doing an operation with a given name will have the same effect whether in Netbeans or the command-line, but sometimes the defaults are different. Also, make sure to avidly read every checkbox and field Netbeans presents you, because checking or not checking something may drastically change what you are doing. One last thing is that Netbeans sometimes says something has been Added, which you might think means it has been added to the Index, but instead this means that it is a new file. More information beyond this guide can be found at the Netbeans documentation for its Git support. Page 11 of 19

12 9.1 Viewing Changes Made There is no direct equivalent to git status with all the hints and extra information, but an view of your changes can be seen by right-clicking on a folder (or your project to see all), and selecting Git Show Changes (Figure 2). This will open a list of the files that have been changed in a panel at the bottom of the Netbeans window. The listing of files changed is, by default, the changes between the Index and Working Directory, ie. things that have not been added. To select a different kind of diff, select one of the three buttons highlighted in Figure 3. The middle one is equivalent to git diff --cached To view the diff for one file, double-click on it s entry. To view the commit history for a project/file/- folder, right-click on it, and select Git Show History (Figure 4, then press Search. Figure 3: Location of different types of diffs, with refresh, view diff, revert and commit buttons to the left Figure 4: Location of Show Changes item. Figure 2: Location of Show Changes item. Page 12 of 19

13 9.2 Manipulating The Index Adding Right click on the file/folder/project and select Git Add. (Figure 5) The file should now show up when using Netbeans to Show Changes in the Index, and in git status Resetting Right click on the file/folder/project and select Git Revert Modifications... (Figure 6). You will be presented with a window with 3 options. The bottom one is what we want simply remove changes from the Index an equivalent to git reset Note that the top option is selected by default, but this one is like doing a combination reset plus checkout that obliterates all your changes to the file/folder/project be careful with this one! The centre one makes it so that the file/folder/project in your working directory matches the files that have been added to the index this is an uncommon choice. Figure 6: Location of the Revert Modifications... item Figure 7: Selecting the type of revert. The equivalent to git reset is selected, and the mouse is over the obliterate option. Figure 5: Adding a changed file to the Index Page 13 of 19

14 9.3 Committing Changes To make a commit from Netbeans, right-click on your project and select the item Git Commit... This will open a window like the one below (Figure 8). Note that pressing Commit right now will commit will commit all files changed, not just ones added to the Index. This is sometimes what you want, but is prone to committing too many things. The behavior can be changed by pressing the leftmost button that is adjacently above the file list, or by carefully un-checking and checking files. Before you commit, it is a good idea to look at the changes you will be committing, which can be done by double-clicking on a file name in the commit window. This window can also accessed by pressing the commit button in the Show Changes panel (Figure 3). Figure 8: A default commit window, with the cursor over the button to change to committing the Index s contents only Page 14 of 19

15 9.4 Stashing To store your changes somewhere in order to safely pull or look at another commit, select your project, open the Team menu, select Shelve Changes Stash Changes (Figure 10), and press the Stash Changes button. 7 You should see all the changes you made disappear from the editor. When you want to get those changes back, select your project, open the Team menu, go into the Shelve Changes Unstash Changes submenu, and select the 0 entry this was the last stash you made (Figure 10). If there is a conflict, then Netbeans will tell you that the stash command failed. You must invoke the conflict resolution tool, or fix the conflicts manually see Section Netbeans differs from git defaults here slightly. Git automatically forgets (drops) stashes that merge without problems, but Netbeans keeps them around either way. If there are too many stashes, then you can then open the repository browser (Team Repository Repository Browser, Figure 11) and drop any stashes you don t need (right-click, select Drop Stash... (Figure 9) and click Yes. Figure 10: Location of the Git Stash sub-menu Figure 9: Dropping a stash Figure 11: Location of the Repository Browser item 7 If you use the right-click menu, it always affects the whole repository Page 15 of 19

16 9.5 Checking-out Files and Commits Checking-out a File Right click on the file/folder you would like to remove changes from, select Git Checkout Checkout Files... (Figure 12), and press the Checkout button Checking-out a Specific Commit Remember to commit first! (Section 9.3) Right click anywhere in the project (any file/folder is fine) and select Git Checkout Checkout Revision... Or, select your project, open the Team menu and select Checkout Checkout Revision... Either will open a window like Figure 13. Press Select and select the commit you would like to view from the list on the right (Figure 14). Figure 13: The Checkout Selected Revision window Figure 14: Choosing a commit Figure 12: Location of the Checkout sub-menu Page 16 of 19

17 9.6 Pulling Be sure to commit first (Section 9.3). If you don t there will be an error window saying that you have local modifications that will conflict. Click Cancel if this happens. To pull, select your project, open the Team menu, select Remote Pull From Upstream (Figure 15), and click Rebase (Figure 16). If there is a problem, a window will pop up telling you there were unresolved conflicts (Figure 17). If you would like to fix the conflicts now, press Resolve and see Section 9.7 for how to continue in that case. To resolve conflicts manually, press Review instead. Press Abort to cancel the operation and go back to the state before you pulled. If you did have to fix conflicts, don t forget to continue the rebase when you re done fixing conflicts see Section Also, Section describes how to manually invoke the conflict resolution tool. Figure 15: Location of the Pull From Upstream item Figure 16: Window for choosing pull type Figure 17: Window that shows up when there is a conflict Page 17 of 19

18 9.7 Resolving Conflicts The Merge Conflicts Resolver When pulling-in your colleagues work, sometimes you will have modified the same parts of the code. Git will not automatically merge these cases, and the require intervention. To help with this, Netbeans provides a graphical conflict resolution tool. It can be opened by right-clicking a file/folder/project, and selecting Git Resolve Conflicts (Figure 18), or by selecting Resolve after a pull with conflicts (Figure 17). In Figure 19 there is an example of what you might see after trying to resolve conflicts from a failed pull. Notice the number of unresolved conflicts, and the tabs for each file with conflicts. For each file tab, navigate between conflicts using the pair buttons at the top left, and choose whether you would like to keep ( accept ) the left code or the right code. If you need to manually fix the code, leave the change unresolved, or select accept both. When you are done with the tool, press OK, and fix anything that needed manual fixing. Files with unresolved conflicts will have their name in red, and will say Both Modified in the Show Changes panel. When you re done, it is a good idea to test that the code compiles, and the tests pass as expected. Figure 18: Location of the Resolve Conflicts item Figure 19: Resolving a conflict from a failed pull -r. Location of the unresolved conflicts count in dashed red, the next and previous difference button in dashed green, and the files with conflicts tabs in dashed orange Page 18 of 19

19 9.7.2 Continuing or Aborting a Rebase or Merge Remember how we had to issue git rebase -- continue after fixing conflicts from a pull -r? (Section 5) Well, you have to do something equivalent after a pull conflict in Netbeans too. To get Netbeans to finish the rebase, you must open the Team menu and select Branch/Tag Rebase... (Figure 21). It will present you with the window in Figure 20, where you should press Continue You can press Abort to go back to the state before you pulled. Note that trying to pull again before either aborting or continuing will not work, giving a cryptic error about not having an upstream branch. Figure 21: Location of the Rebase... item Figure 20: An Unfinished Rebase window Page 19 of 19

Submitting your Work using GIT

Submitting your Work using GIT Submitting your Work using GIT You will be using the git distributed source control system in order to manage and submit your assignments. Why? allows you to take snapshots of your project at safe points

More information

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b Git Cheat Sheet Git Basics Rewriting Git History git init Create empty Git repo in specified directory. Run with no arguments to initialize the current directory as a git repository. git commit

More information

Git Introduction CS 400. February 11, 2018

Git Introduction CS 400. February 11, 2018 Git Introduction CS 400 February 11, 2018 1 Introduction Git is one of the most popular version control system. It is a mature, actively maintained open source project originally developed in 2005 by Linus

More information

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group About SJTUG SJTU *nix User Group SJTU Joyful Techie User Group Homepage - https://sjtug.org/ SJTUG Mirrors - https://mirrors.sjtug.sjtu.edu.cn/ GitHub - https://github.com/sjtug Git Basic Tutorial Zhou

More information

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read) 1 For the remainder of the class today, I want to introduce you to a topic we will spend one or two more classes discussing and that is source code control or version control. What is version control?

More information

Assumptions. GIT Commands. OS Commands

Assumptions. GIT Commands. OS Commands Many of the world s largest dev teams have adopted Git and it s not hard to see why It can handle small and large projects easily It has a tiny footprint It outclasses other version control tools It s

More information

TDDC88 Lab 4 Software Configuration Management

TDDC88 Lab 4 Software Configuration Management TDDC88 Lab 4 Software Configuration Management Introduction "Version control is to programmers what the safety net is to a trapeze artist. Knowing the net is there to catch them if they fall, aerialists

More information

G E T T I N G S TA R T E D W I T H G I T

G E T T I N G S TA R T E D W I T H G I T G E T T I N G S TA R T E D W I T H G I T A A R O N H O O V E R & B R A D M I N C H J A N U A R Y 2 2, 2 0 1 8 1 Why use a version control system? Much of this document was blatantly cribbed from Allen

More information

Tutorial 2 GitHub Tutorial

Tutorial 2 GitHub Tutorial TCSS 360: Software Development Institute of Technology and Quality Assurance Techniques University of Washington Tacoma Winter 2017 http://faculty.washington.edu/wlloyd/courses/tcss360 Tutorial 2 GitHub

More information

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1 GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1 WHO AM I? @tushar_rishav GSoC'16 student contributing to coala - a static code analysis tool, under Python So ware Foundation. A senior

More information

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47 Working with GIT MNXB01 2017 Florido Paganelli Lund University florido.paganelli@hep.lu.se Florido Paganelli MNXB01-2017 - Working with git 1/47 Required Software Git - a free and open source distributed

More information

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Common Git Commands Git Crash Course Teon Banek theongugl@gmail.com April 7, 2016 Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Outline 1 Introduction About Git Setup 2 Basic Usage Trees Branches

More information

Software Development I

Software Development I 6.148 Software Development I Two things How to write code for web apps. How to collaborate and keep track of your work. A text editor A text editor A text editor Anything that you re used to using Even

More information

1. Git. Robert Snapp

1. Git. Robert Snapp . Git Robert Snapp snapp@cs.uvm.edu Department of Computer Science University of Vermont CS 3 (UVM). Git Fall 0 / Git CS 3 (UVM). Git Fall 0 / Setting your defaults in /.git > git config --global user.name

More information

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36 ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36 Git Tutorial André Sailer CERN-EP-LCD ILD Technical Meeting April 24, 2017 LD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 2/36

More information

Version Control: Gitting Started

Version Control: Gitting Started ting Started Cai Li October 2014 What is Version Control? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Local Version

More information

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng GIT CS 490MT/5555, Spring 2017, Yongjie Zheng GIT Overview GIT Basics Highlights: snapshot, the three states Working with the Private (Local) Repository Creating a repository and making changes to it Working

More information

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system Git A fast distributed revision control system Nils Moschüring PhD Student (LMU) 1 The three W s What? Why? Workflow and nomenclature 2 Overview of gits structure Structure Branches 3 Using git Setting

More information

git Version: 2.0b Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command:

git Version: 2.0b Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command: Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command: git --help Get common commands and help git --help How to use git

More information

Git. A fast distributed revision control system. Nils Moschüring PhD Student (LMU)

Git. A fast distributed revision control system. Nils Moschüring PhD Student (LMU) Git A fast distributed revision control system Nils Moschüring PhD Student (LMU) Nils Moschüring PhD Student (LMU), Git 1 1 The three W s What? Why? Workflow and nomenclature 2 Overview of gits structure

More information

Advanced Operating Systems Control Versioning with GIT. Giuseppe Massari

Advanced Operating Systems Control Versioning with GIT. Giuseppe Massari Control Versioning with GIT Giuseppe Massari giuseppe.massari@polimi.it Outline 2/54 Why using version control tools? Why Git? First steps Getting help and configuration Basic concepts Local repository

More information

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015 Git CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015 1 Lecture Goals Present a brief introduction to git You will need to know git to work on your presentations this semester 2 Git

More information

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko 213/513/613 Linux/Git Bootcamp Cyrus, Eugene, Minji, Niko Outline 1. SSH, bash, and navigating Linux 2. Using VIM 3. Setting up VS Code 4. Git SSH 1. On macos/linux: $ ssh ANDREW-ID@shark.ics.cs.cmu.edu

More information

How to version control like a pro: a roadmap to your reproducible & collaborative research

How to version control like a pro: a roadmap to your reproducible & collaborative research How to version control like a pro: a roadmap to your reproducible & collaborative research The material in this tutorial is inspired by & adapted from the Software Carpentry lesson on version control &

More information

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015 Git all meaningful operations can be expressed in terms of the rebase command -Linus Torvalds, 2015 a talk by alum Ross Schlaikjer for the GNU/Linux Users Group Sound familiar? add commit diff init clone

More information

Lab 1 1 Due Wed., 2 Sept. 2015

Lab 1 1 Due Wed., 2 Sept. 2015 Lab 1 1 Due Wed., 2 Sept. 2015 CMPSC 112 Introduction to Computer Science II (Fall 2015) Prof. John Wenskovitch http://cs.allegheny.edu/~jwenskovitch/teaching/cmpsc112 Lab 1 - Version Control with Git

More information

Version Control with GIT

Version Control with GIT Version Control with GIT Benjamin Roth CIS LMU München Benjamin Roth (CIS LMU München) Version Control with GIT 1 / 30 Version Control Version control [...] is the management of changes to documents, computer

More information

Chapter 5. Version Control: Git

Chapter 5. Version Control: Git Chapter 5 Version Control: Git The Replication Crisis continues to heat up discussion across social science. Hence principled researchers want to make their work easy to replicate and reputable journals

More information

Revision control. INF5750/ Lecture 2 (Part I)

Revision control. INF5750/ Lecture 2 (Part I) Revision control INF5750/9750 - Lecture 2 (Part I) Problem area Software projects with multiple developers need to coordinate and synchronize the source code Approaches to version control Work on same

More information

Software Revision Control for MASS. Git Installation / Configuration / Use

Software Revision Control for MASS. Git Installation / Configuration / Use Software Revision Control for MASS Git Installation / Configuration / Use Matthew Sell, CSSE Student MASS Research Participant, February 2014 Overview Download / execute installer Initial configuration

More information

Using GitHub to Share with SparkFun a

Using GitHub to Share with SparkFun a Using GitHub to Share with SparkFun a learn.sparkfun.com tutorial Available online at: http://sfe.io/t52 Contents Introduction Gitting Started Forking a Repository Committing, Pushing and Pulling Syncing

More information

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes Git Charles J. Geyer School of Statistics University of Minnesota Stat 8054 Lecture Notes 1 Before Anything Else Tell git who you are. git config --global user.name "Charles J. Geyer" git config --global

More information

Introduction, Instructions and Conventions

Introduction, Instructions and Conventions Encodo Systems AG Garnmarkt 1 8400 Winterthur Telephone +41 52 511 80 80 www.encodo.com Encodo GIT handbook Introduction, Instructions and Conventions Abstract This document is an introduction to using

More information

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Table of Contents Preparation... 3 Exercise 1: Create a repository. Use the command line.... 4 Create a repository...

More information

Git Workbook. Self-Study Guide to Git. Lorna Mitchell. This book is for sale at

Git Workbook. Self-Study Guide to Git. Lorna Mitchell. This book is for sale at Git Workbook Self-Study Guide to Git Lorna Mitchell This book is for sale at http://leanpub.com/gitworkbook This version was published on 2018-01-15 This is a Leanpub book. Leanpub empowers authors and

More information

Introduction to Version Control

Introduction to Version Control Research Institute for Symbolic Computation Johannes Kepler University Linz, Austria 21-Nov-2013 Outline General Remarks about Version Control 1 General Remarks about Version Control 2 Outline General

More information

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014 Git Tutorial Version: 0.2 Anders Nilsson andersn@control.lth.se April 1, 2014 1 Introduction Why use git, or any other version control software to keep track of files? In short there are at least three

More information

Version Control for Fun and Profit

Version Control for Fun and Profit Version Control for Fun and Profit Chris Brady Heather Ratcliffe The Angry Penguin, used under creative commons licence from Swantje Hess and Jannis Pohlmann. Warwick RSE 30/11/2017 Version control 30/11/2017

More information

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová,

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová, GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová, 25.4.2016 Basic features Distributed version control Developed in 2005, originally for Linux kernel development Free, GNU General Public License version

More information

Git for Version Control

Git for Version Control Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from http://git-scm.com/book/en/ http://www.cs.washington.edu/403/ About

More information

Common Configuration Management Tasks: How to Do Them with Subversion

Common Configuration Management Tasks: How to Do Them with Subversion Common Configuration Management Tasks: How to Do Them with Subversion Tom Verhoeff October 2007 Contents 1 The Big Picture 2 2 Subversion Help 2 3 Create New Empty Repository 2 4 Obtain Access to Repository

More information

Laboratorio di Programmazione. Prof. Marco Bertini

Laboratorio di Programmazione. Prof. Marco Bertini Laboratorio di Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Code versioning: techniques and tools Software versions All software has multiple versions: Each

More information

Git version control with Eclipse (EGit) Tutorial

Git version control with Eclipse (EGit) Tutorial Git version control with Eclipse (EGit) Tutorial 출처 : Lars Vogel http://www.vogella.com/tutorials/eclipsegit/article.html Lars Vogel Version 3.6 Copyright 2009, 2010, 2011, 2012, 2013, 2014 Lars Vogel

More information

VCS VERSION CONTROL SYSTEMS

VCS VERSION CONTROL SYSTEMS VCS VERSION CONTROL SYSTEMS http://goo.gl/1tc7oh http://waynelkh.github.io/sa-git 1 WHO AM I? NCTU-CSCC TA wnlee 2 WHAT IS "VERION CONTROL" Version control is a system that records changes to a file or

More information

Github/Git Primer. Tyler Hague

Github/Git Primer. Tyler Hague Github/Git Primer Tyler Hague Why Use Github? Github keeps all of our code up to date in one place Github tracks changes so we can see what is being worked on Github has issue tracking for keeping up with

More information

CSE 391 Lecture 9. Version control with Git

CSE 391 Lecture 9. Version control with Git CSE 391 Lecture 9 Version control with Git slides created by Ruth Anderson & Marty Stepp, images from http://git-scm.com/book/en/ http://www.cs.washington.edu/391/ 1 Problems Working Alone Ever done one

More information

Git. Presenter: Haotao (Eric) Lai Contact:

Git. Presenter: Haotao (Eric) Lai Contact: Git Presenter: Haotao (Eric) Lai Contact: haotao.lai@gmail.com 1 Acknowledge images with white background is from the following link: http://marklodato.github.io/visual-git-guide/index-en.html images with

More information

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic - basics Matthäus Zloch GESIS Outline for this session Git introduction and some theory Git command basics (plus some little advanced)

More information

A BASIC UNDERSTANDING OF VERSION CONTROL

A BASIC UNDERSTANDING OF VERSION CONTROL A BASIC UNDERSTANDING OF VERSION CONTROL DID YOU EVER DO THIS? DID YOU EVER DO THIS? DID YOU EVER DO THIS? DID YOU EVER DO THIS? DID YOU EVER DO THIS? DID YOU EVER DO THIS? DID YOU EVER DO THIS? DID YOU

More information

Version Control System - Git. zswu

Version Control System - Git. zswu Version Control System - Git zswu Overview Why VCS? Why Git? Using Git Personally Using Git with Others Etiquette Rules of Using Git Tools & Services Tips 2 Why VCS (1/3) How do you manage your homework?

More information

And check out a copy of your group's source tree, where N is your one-digit group number and user is your rss username

And check out a copy of your group's source tree, where N is your one-digit group number and user is your rss username RSS webmaster Subversion is a powerful, open-source version control system favored by the RSS course staff for use by RSS teams doing shared code development. This guide is a primer to the use of Subversion

More information

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; Why should I use a VCS? Repositories Types of repositories: Private - only you and the

More information

Git, the magical version control

Git, the magical version control Git, the magical version control Git is an open-source version control system (meaning, it s free!) that allows developers to track changes made on their code files throughout the lifetime of a project.

More information

Distributed Version Control (with Git)

Distributed Version Control (with Git) Distributed Version Control (with Git) Introduction and Tutorial fhlug 24. 03. 2011 Why Distributed? No single point of failure Automatic backups Fast local operations (log, diff, checkout, ) Authenticity

More information

Lab Exercise Git: A distributed version control system

Lab Exercise Git: A distributed version control system Lunds tekniska högskola Datavetenskap, Nov 21, 2016 EDAF45 Programvaruutveckling i grupp projekt Labb 2 (Git): Labbhandledning Checked on Git versions: 2.7.4 Lab Exercise Git: A distributed version control

More information

Git Resolve Conflict Using Mine Command Line

Git Resolve Conflict Using Mine Command Line Git Resolve Conflict Using Mine Command Line We'll explore what approaches there are to resolve the conflict, and then we'll Please, fix them up in the work tree, and then use 'git add/rm ' as appropriate

More information

Version control with Git.

Version control with Git. 1 Version control with Git http://git-scm.com/book/en/ Basic Intro to Git We will: Discuss how Git differs from Subversion Discuss the basic Git model Pull/clone files from a repository on github Edit

More information

Source Code Management wih git

Source Code Management wih git Source Code Management wih git Matthieu Herrb December 22 http://homepages.laas.fr/matthieu/cours/git.pdf Licence This work is licensed under a Creative Commons Attribution-ShareAlike 3. Unported License.

More information

Human-Computer Interaction Design

Human-Computer Interaction Design Human-Computer Interaction Design COGS120/CSE170 - Intro. HCI Instructor: Philip Guo, Lab TA: Sean Kross Lab 1 - Version control and HTML (2017-10-06) by Michael Bernstein, Scott Klemmer, Philip Guo, and

More information

Intro to Github. Jessica Young

Intro to Github. Jessica Young Intro to Github Jessica Young jyoung22@nd.edu GitHub Basics 1. Installing GitHub and Git 2. Connecting Git and GitHub 3. Why use Git? Installing GitHub If you haven t already, create an account on GitHub

More information

Git. A Distributed Version Control System. Carlos García Campos

Git. A Distributed Version Control System. Carlos García Campos Git A Distributed Version Control System Carlos García Campos carlosgc@gnome.org Carlos García Campos carlosgc@gnome.org - Git 1 A couple of Quotes For the first 10 years of kernel maintenance, we literally

More information

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

CS 520: VCS and Git. Intermediate Topics Ben Kushigian CS 520: VCS and Git Intermediate Topics Ben Kushigian https://people.cs.umass.edu/~rjust/courses/2017fall/cs520/2017_09_19.zip Our Goal Our Goal (Overture) Overview the basics of Git w/ an eye towards

More information

Creating a Patch. Created by Carl Heymann on 2010 Sep 14 1

Creating a Patch. Created by Carl Heymann on 2010 Sep 14 1 Created by on 2010 Sep 14 1 1. Starting a Patch To create a patch, and get it through the review process and into a main branch of a project, you can follow the following steps: Clone the project if you

More information

2 Initialize a git repository on your machine, add a README file, commit and push

2 Initialize a git repository on your machine, add a README file, commit and push BioHPC Git Training Demo Script First, ensure that git is installed on your machine, and you have configured an ssh key. See the main slides for instructions. To follow this demo script open a terminal

More information

git-flow Documentation

git-flow Documentation git-flow Documentation Release 1.0 Johan Cwiklinski Jul 14, 2017 Contents 1 Presentation 3 1.1 Conventions............................................... 4 1.2 Pre-requisites...............................................

More information

6 Git & Modularization

6 Git & Modularization 6 Git & Modularization Bálint Aradi Course: Scientific Programming / Wissenchaftliches Programmieren (Python) Prerequisites Additional programs needed: Spyder3, Pylint3 Git, Gitk KDiff3 (non-kde (qt-only)

More information

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy s Sylvain Bouveret, Grégory Mounié, Matthieu Moy 2017 [first].[last]@imag.fr http://recherche.noiraudes.net/resources/git/git-workflow-slides.pdf 1 / 16 Goals of the presentation Global history: multiple

More information

Technology Background Development environment, Skeleton and Libraries

Technology Background Development environment, Skeleton and Libraries Technology Background Development environment, Skeleton and Libraries Christian Kroiß (based on slides by Dr. Andreas Schroeder) 18.04.2013 Christian Kroiß Outline Lecture 1 I. Eclipse II. Redmine, Jenkins,

More information

CSE 374 Programming Concepts & Tools. Hal Perkins Winter 2012 Lecture 16 Version control and svn

CSE 374 Programming Concepts & Tools. Hal Perkins Winter 2012 Lecture 16 Version control and svn CSE 374 Programming Concepts & Tools Hal Perkins Winter 2012 Lecture 16 Version control and svn Where we are Learning tools and concepts relevant to multi-file, multi-person, multi-platform, multi-month

More information

MOOSE-Based Application Development on GitLab

MOOSE-Based Application Development on GitLab MOOSE-Based Application Development on GitLab MOOSE Team Idaho National Laboratory February 22, 2016 Introduction The intended audience for this talk is developers of INL-hosted, MOOSE-based applications.

More information

Computer Science Design I Version Control with Git

Computer Science Design I Version Control with Git Computer Science Design I Version Control with Git Department of Electrical Engineering & Computer Science Information Technology & Telecommunications Research Center The University of Kansas annguyen@ittc.ku.edu

More information

1/20/13 Git tutorial. Git tutorial. Mike Nolta. file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31

1/20/13 Git tutorial. Git tutorial. Mike Nolta. file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31 Git tutorial Mike Nolta file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31 1. Basics file:///users/nolta/github/reveal.js/git.html?print-paper#/ 2/31 Tell git who you are $ git config --global

More information

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Version Control September 18, 2018 Thursday (September 20) First in-class exercise On using git (today is a prelude with useful

More information

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi)

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi) A Brief Introduction to Git Sylverie Herbert (based on slides by Hautahi Kingi) Introduction Version control is better than mailing files back and forth because: Nothing that is committed to version control

More information

Barry Grant

Barry Grant Barry Grant bjgrant@umich.edu http://thegrantlab.org What is Git? (1) An unpleasant or contemptible person. Often incompetent, annoying, senile, elderly or childish in character. (2) A modern distributed

More information

Eugene, Niko, Matt, and Oliver

Eugene, Niko, Matt, and Oliver 213/513 Linux/Git Bootcamp Eugene, Niko, Matt, and Oliver outline 1. ssh but also Windows ssh client especially 2. bash commands + navigating Linux 3. VIM and VS Code 4. Git how to ssh 1. on OS X/Linux:

More information

CSE 332: Data Structures and Parallelism Autumn 2017 Setting Up Your CSE 332 Environment In this document, we will provide information for setting up Eclipse for CSE 332. The first s ection covers using

More information

Git(Lab) Tutorial and Hands-On

Git(Lab) Tutorial and Hands-On Git(Lab) Tutorial and Hands-On Analysis Workshop 34th KATRIN Collaboration Meeting Institut für Kernphysik WWU Münster 21.02.2018 Git(Lab) Tutorial and Hands-On Or: Why branches aren t homeomorphic endofunctors

More information

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects. Git AN INTRODUCTION Introduction to Git as a version control system: concepts, main features and practical aspects. How do you share and save data? I m working solo and I only have one computer What I

More information

How to be a git. Dominic Mitchell

How to be a git. Dominic Mitchell How to be a git Dominic Mitchell Git! It s new! Everybody s talking about it! What is it? Distributed Version Control Why Git? Fast Local Toolkit Widely used Github Toolkit lets other people build tools

More information

I m an egotistical bastard, and I name all my projects after myself. First Linux, now git. Linus Torvalds, creator of Linux and Git

I m an egotistical bastard, and I name all my projects after myself. First Linux, now git. Linus Torvalds, creator of Linux and Git I m an egotistical bastard, and I name all my projects after myself. First Linux, now git. Linus Torvalds, creator of Linux and Git Git Benedict R. Gaster University of West of England November 23, 2015

More information

Version Control. Version Control

Version Control. Version Control Version Control Prepared for CS 342 - Software Design by John Bell Based on slides prepared by Jason Leigh for CS 340 University of Illinois at Chicago Version Control Incredibly important when working

More information

Using Git to Manage Source RTL

Using Git to Manage Source RTL Using Git to Manage Source RTL CS250 Tutorial 1 (Version 082311) August 24, 2011 Brian Zimmer How to use this tutorial This class will be using Git for all of the labs and projects. This will allow the

More information

Windows. Everywhere else

Windows. Everywhere else Git version control Enable native scrolling Git is a tool to manage sourcecode Never lose your coding progress again An empty folder 1/30 Windows Go to your programs overview and start Git Bash Everywhere

More information

Apache Subversion Tutorial

Apache Subversion Tutorial Apache Subversion Tutorial Computer Science Standard C-6.C Diana Machado Raul Garcia Dr. Shu-Ching Chen Florida International University Computer Science 2/22/2014 What is Subversion (SVN)? A free and

More information

Gitting things done. Hands-on introduction to git niceties. Jan Urbański Ducksboard

Gitting things done. Hands-on introduction to git niceties. Jan Urbański Ducksboard Gitting things done Hands-on introduction to git niceties Jan Urbański jan@ducksboard.com Ducksboard Atlassian Git Party, Madrid, September 25, 2012 Jan Urbański (Ducksboard) Gitting things done Atlassian

More information

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment This document guides you through setting up Eclipse for CSE 332. The first section covers using gitlab to access

More information

Human-Computer Interaction Design

Human-Computer Interaction Design Human-Computer Interaction Design COGS120/CSE170 - Intro. HCI Instructor: Philip Guo Lab 1 - Version control and HTML (2018-10-03) by Michael Bernstein, Scott Klemmer, Philip Guo, and Sean Kross [Announce

More information

Version control with git and Rstudio. Remko Duursma

Version control with git and Rstudio. Remko Duursma Version control with git and Rstudio Remko Duursma November 14, 2017 Contents 1 Version control with git 2 1.1 Should I learn version control?...................................... 2 1.2 Basics of git..................................................

More information

Beyond git add/commit/push

Beyond git add/commit/push add Working dir commit Staging area push Local Remote Based on original version made by Alexis López @aa_lopez About us @tuxtor @edivargas jorgevargas.mx github.com/tuxtor Review traditionals commands

More information

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Section 2: Developer tools and you. Alex Mariakakis (staff-wide) Section 2: Developer tools and you Alex Mariakakis cse331-staff@cs.washington.edu (staff-wide) What is an SSH client? Uses the secure shell protocol (SSH) to connect to a remote computer o Enables you

More information

Git tutorial. Katie Osterried C2SM. October 22, 2015

Git tutorial. Katie Osterried C2SM. October 22, 2015 Git tutorial Katie Osterried C2SM October 22, 2015 Outline 1 What is Git and why are we switching? 2 Working with Git 3 Branching and Merging 4 Working with remote repositories 5 Recommendations Outline

More information

Version Control Systems

Version Control Systems Nothing to see here. Everything is under control! September 16, 2015 Change tracking File moving Teamwork Undo! Undo! UNDO!!! What strategies do you use for tracking changes to files? Change tracking File

More information

LPF Training Handbook!

LPF Training Handbook! LPF Training Handbook M Hewitson 2014-04-25 1. Introduction 1 2. Software setup 1 Accessing the relevant software repositories 2 Getting the software 3 Installing LTPDA 3 Installation of Extension modules

More information

Handout 4: Version Control Reference

Handout 4: Version Control Reference CSCI 2600 Principles of Software Handout 4: Version Control Reference Introduction SVN (Subversion) provides the following functionality: It allows multiple users to edit the same files independently,

More information

Software Development. Using GIT. Pr. Olivier Gruber. Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes

Software Development. Using GIT. Pr. Olivier Gruber. Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes Software Development 1 Using GIT Pr. Olivier Gruber olivier.gruber@imag.fr Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes Overview 2 What is GIT Keeping histories of the evolution

More information

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects. Git AN INTRODUCTION Introduction to Git as a version control system: concepts, main features and practical aspects. How do you share and save data? I m working solo and I only have one computer What I

More information

Version control system (VCS)

Version control system (VCS) Version control system (VCS) Remember that you are required to keep a process-log-book of the whole development solutions with just one commit or with incomplete process-log-book (where it is not possible

More information

Implement an ADT while using Subversion

Implement an ADT while using Subversion 1 Objectives Learn to use Subversion Implement an ADT while using Subversion In this lab, you learn about the version control tool called Subversion and you will implement a Java class given an interface.

More information

Gitlab Setup/Usage by Yifeng Zhu modified by Vince Weaver 30 January 2019

Gitlab Setup/Usage by Yifeng Zhu modified by Vince Weaver 30 January 2019 ECE271: Microcomputer Architecture and Applications University of Maine Gitlab Setup/Usage by Yifeng Zhu modified by Vince Weaver 30 January 2019 Background We will submit our labs in ECE271 via git to

More information