Presentation is loading. Please wait.

Presentation is loading. Please wait.

SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.

Similar presentations


Presentation on theme: "SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin."— Presentation transcript:

1 SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin

2 LAB SUMMARIES These are due starting this week Should be ~1/2 a page What you did this week What did you try different this week What went well What went poorly

3 CONTINUOUS IMPROVEMENT Improve, improve, improve Give things a chance

4 DEFINITION OF READY This is a list of requirements for a user story for it to be added to ‘todo’ Generally a short list like Has acceptance tests Has been sized Reviewed by product owner

5 GIT Git is a distributed version control system It remembers what you (and who) changed and when That doesn’t make it safe. You can rewrite history Complete (ish) copies are stored locally and remotely

6 GIT ARCHITECTURE Remote Local Staging Workspace Staging Workspace Staging Workspace Add Commit Push / Pull

7 IGNORE You don’t actually want to store all the files in the directory you are working on in your git repository Temporary files: *~,.#*#, *.swp, ~$*, etc Editor specific files:.project Compiled binaries (you might want to keep some) Data files Use a.gitignore file *.swo – ignore files with.swo extensions bin/ - ignore the bin directory and everything in it Blob.csv – ignore the Blob.csv file

8 COMMITS Your history (from git’s point of view) is broken up into commits Commits should be as small as possible Should be a single change / bug fix / thing Commits are tagged by the author / committer (Github relies on matching email addresses) Each commit is made up of: changes made to one or more files an author Commit message Gpg signature [optional]

9 GIT ADD In order to make a commit you assemble the relevant diffs in the staging area git add filename ~ adds a specific file to staging git add. ~ adds every file in this directory which has changed (or is new) and is not ignored to staging (won’t catch deleted files) git add –A ~ adds all files which have been changed, created, or deleted (and not ignored) to staging git add –p ~ interactive prompt which asks you about adding changes chunk by chunk (can get more than one change from a single file)

10 GIT COMMIT Commit bundles everything from staging into a single commit and moves it into the local repository Staging is emptied after the commit Commits are given a message – What this commit did git commit –m “commit message” If you don’t do ‘–m’ it will bring up an editor for you to type in your message (normally vim is the default – can change this)

11 GIT STATUS git status Shows what files have been modified, renamed, deleted, or not yet added to version control

12 GIT BRANCH Branches allow for independent development that can be later recombined Change branches with git checkout branchname Create branches with git branch branchname master rainbows

13 COMBING BRANCHES git merge target ~ combine target branch into current branch git rebase ~ move the start along so that it looks like the branch all happened after (you can now merge easily). This rewrites history rainbows master rainbows master mergerebase

14 MOVING THOUGH TIME AND SPACE git reset ~ remove file from staging git reset ~ throw away commits after a given one (local ones) git checkout ~ switch branch git checkout ~ go to a given commit to look at, or create a branch from git revert ~ create a commit which undoes previous ones (history preserving)

15 CONFLICTS When you combine your work with others, you can get conflicts Git cannot always tell how to combine different bits of work You manually fix all the conflicts, add the conflicted files, then commit Conflicts are marked as: <<<<<<< HEAD Your current state ======= The other branch’s work >>>>>>> otherBranch

16 TO / FROM THE CLOUD Everything so far has been local git pull remote branch ~ pull in changes from the remote for a branch git push remote branch ~ push changes from local to the remote Must be fully up to date (pull) before you can push

17 COMMIT HOOKS These are local scripts that run during the commit (not only) process They live in.git/hooks (remove the.sample from the filename to enable) They can be use to automatically check code for style, linting, tests They are not copied when you clone / push / pull

18 GIT ATTRIBUTES Can be used to set file properties for the repository (e.g line endings) Allows the system to automatically convert line endings on checkout Allows you to mark files as binary Allows you to mark files as being in a specific language

19 GITHUB Github provides a number of cool features Readme.md is automatically rendered Issue tracker integrated with commit messages Project wiki

20 GIT TOOLS Command line Source tree Github Egit (eclipse) Sublime text git / SublimeGit


Download ppt "SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin."

Similar presentations


Ads by Google