Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines News
Documents
Sheet Music
Git Work Book
Save
Embed
Share
Print
Download
Join
RSD CLG Renewal_ v2.0
1
of 74
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
6 Phase of Pm Dra� Work
VB6
Search document
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines News
Documents
Sheet Music
Git Work Book
Save
Embed
Share
Print
Download
Join
RSD CLG Renewal_ v2.0
1
of 74
6 Phase of Pm Dra� Work
VB6
Search document
Git Workbook Self-Study Guide to Git Lorna Mitchell This book is for sale at http://leanp http://leanpub.com/gitw ub.com/gitworkbook orkbook This version was published on 2016-07-06
This is a Leanpub a Leanpub book. book. Leanpub empowers authors and publishers with the L Publishing process. Lean process. Lean Publishing is Publishing is the act of publishing an in-progress ebo using lightweight tools and many iterations to get reader feedback, pivot until have the right book and build traction once you do. © 2014 - 2016 Lorna Mitchell
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines News
Documents
Sheet Music
Git Work Book
Save
Embed
Share
Print
Download
Join
RSD CLG Renewal_ v2.0
1
of 74
6 Phase of Pm Dra� Work
VB6
Search document
Tweet This Book! Please help Lorna Mitchell by spreading the word about this book on Twitter on Twitter The suggested hashtag for this book is #gitworkbook #gitworkbook..
Find out what other people are saying about the book by clicking on this link t search for this hashtag on Twitter: https://twitter.com/search?q=#gitworkbook
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines News
Documents
Sheet Music
Git Work Book
Save
Embed
Share
Print
Download
Join
RSD CLG Renewal_ v2.0
1
of 74
6 Phase of Pm Dra� Work
VB6
Search document
Also By Lorna By Lorna Mitchell N Ways To Be A Better Developer Zend Certification Preparation Pack
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Upload
Sign In
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines News
Documents
Sheet Music
Git Work Book
Save
Embed
Share
Print
Download
Join
RSD CLG Renewal_ v2.0
1
of 74
6 Phase of Pm Dra� Work
VB6
Search document
Contents About This Workbook Get Some Tools Configure Git Make A Repository What’s Happening? Ask Git Status Keep Your Changes Under (Source) Control Study Your History with Git Log Inspect Your Changes with Git Diff Unstage An Added File Fix An Incorrect Commit Message Branch To Create A Safe Working Area Apply a Branch of Changes with Git Merge What’s The Story? Ask Git Log Git’s Staging Area Master your with Get semester The Right Com mit OnScribd The Right BranchRead Free Foron 30this Days Sign up to vote title ot The Times Difference: More Git Diff & The NewSpYork Useful Not useful Cancel anytime. Special offer for students: PoweOnly r D$4.99/month. iff with Diff Tool Handle Interruptions with Git Stash
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
Download
News
Documents
Sheet Music
Join
RSD CLG Renewal_ v2.0
1
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
Understand Multiple Remotes Use Tracking Branches for Easy Collaboration Pull With Rebase When Your Branch Is Out Of Date Git Hooks Projects Within Projects: Git Submodule Git Bisect for Fault Finding in a Forest of Commits Quiz Answers Credits
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
Download
News
Documents
Sheet Music
Join
RSD CLG Renewal_ v2.0
1
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
About This Workbook
This workbook is designed to equip you with the skills you need to use the Git s control tool. It assumes absolutely no pre-requisite knowledge at all. To get the out of this book you will need: • an attitude attitude for partici participatio pation n • a GitHub.com GitHub.com account (sign (sign up if you don’t have one, it’s free) • some some time. time. Little Little stolen stolen moment momentss of time time is fine, this is all about about the pieces
There is no easy way to pick up new skills, and git is no exception (and also th a lot of git skills!). In recognition of that, this workbook encapsulates everything will need for all the various areas, by explaining it, showing you, and then a you to try it yourself. There are some puzzles and quizzes along with the exerc these are there to hack your brain into remembering this stuff! It’s tempting to through or imagine what you would write, but please embrace the experienc work through all the exercises and puzzles, I promise it will help to make every end up in your brain.
There are some supporting materials in git repositories on GitHub: you can find them under the Git Workbook organisation here: here: https://github.com/gitworkbo
MasterIfyour semester with Scribd a@ you you have have an comm commen ents ts or ques questi tion ons, s, then then I woul would dSign love love tovote hear he them thDays em: lorna@ Read Free Forar 30this up to on title: lorn & The New York Times Have fun! Useful Not useful Special offer for students: Only $4.99/month.
Each Each secti section on has has a bo box x for for you you to tick tick
Cancel anytime.
so you you can can trac trackk your your prog progre ress ss
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
1
Download
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
common to all platforms. I recommend that everyone gets to know a little bit o command line in git, and then goes on to choose a tool for everyday use - if yo TextMate, Eclipse, or another IDE then there will be support for git in those to
To begin, begin, there there’s ’s some some go good od docume documenta ntatio tion n for each each platfo platform rm availa available ble at https:/ up-git/².. up-git/²
Assignment Your first assignment is to install git. 1) Go to http://git-scm.com/downloads to http://git-scm.com/downloads and and follow the instructions for your system 2) If you already have git installed check that it is relatively new (1.8 or later) by typing git --version --version I have installed git version 1.8 or later
Configure Git
The main point of version control is to have a safe place to keep the canonical ve of a project, and to have a record of all the changes that occurred in that project. Masterchange yourissemester withasScribd a cha a “commit” (used both a noun and aRead verb: you “commit Free Forcan 30this Days Sign up to vote on title or “create a commit”), information: & The New York Timesand will include a few keypieces Useful of Not useful Special offer for students: Only $4.99/month.
• Exactly Exactly what what change change was made
Cancel anytime.
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
1
Download
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS git config --global user.name "My Own Name Here" git config --global user.email "
[email protected]" "
[email protected]"
In typical commandline style, git doesn’t give any feedback, but we can check config settings with git git config config --list --list (it can be a very long list, dependin your setup) $ git git conf config ig --li --list st color.diff= color.diff= auto color.status= color.status= auto color.branch= color.branch= auto user.name= user.name=Lorna Mitchell Mitchell user.email=
[email protected] diff.tool= diff.tool= vimdiff push.default= push.default= simple
The username and email settings are the really important ones since this inform gets associated with each commit that you make. If you see issues such as avatar not appearing on GitHub, check these settings and make sure that your e addresses are the same in your config and on GitHub. Git can accept configuration at different levels. The three scopes for git config
Master your semester with Scribd System Global & The New York Times Applies to everyone using Special offer for students: Only $4.99/month. the
Read Free Sign up Ltoocvote aFor l (on d30 ethis fDays autitle lt)
Not useful Cancel anytime.
Useful
Applies Applies to this
Applies Applies to the current current
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
Join
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
1
Download
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
git config config user.ema user.email il "jo@emax "jo@emaxple. ple.com" com" • First, First, she she types types git • Then realises that not only only did she mistype her email address, address, but she als wanted to set it for all repos config --globa --global l user.ema user.email il "jo@exam "jo@example. ple.com" com" • Next Next she she types types git config • Satisfied, Satisfied, she goes goes on to finish her work work and commit commit it.
Which email address will be associated with her commit? ……………………… Why? ………………………………………………………………………………………. How could Jo have checked her settings beforehand? …………………………. Quiz answers can be found at the end of the workbook
Some other handy configuration options that you might like to set up at this po color.ui
Try setting this to true to get more colours in your terminal core.editor
Sets which program you’ll be prompted to use to edit things in. Git wi your system default editor or vi, but you can set whichever program y use. Master yourrather semester with Scribd
& The New York Times core.autocrlf Special offer for students: Only $4.99/month. Windows users,
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
please set this to true. It will help you to avoid whites issues in your projects.
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Upload
Sign In
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
1
Download
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
Make A Repository
Git is a distributed version control system, which means that you do your local on an actual repository, and there are other remotes which are also repositor exactly the same way. We’ll start by making a standalone repository and then discuss how to link it to other repositories or “repos” as they are known.
The command to create a repo is git git init init [dir [dir] ]. If you run git init init on its your new repo will be in the current directory. If you run git init init myproj myproject ect you’ll get a new directory called myproject with a git repo inside it. You can c if a directory is a git repo by running git git status status (if it says “not a git reposit check you changed into the directory you created the repository in) or by che that there is a hidden .git/ directory inside there.
Assignment 1) Create a new git repository in the directory project1. 2) Check that this directory exists and is a git repository I now have a repository to use for the next examples
Happening? Ask Git Status MasterWhat’s your semester with Scribd Read Free Foron 30this Days Sign up to vote title & The New York Times Useful Not useful
Cancel anytime. The most useful command in git doesn’t actually do anything! It is git status tells you what is going on in your working directory. When you run git git sta
Special offer for students: Only $4.99/month.
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
RSD CLG Renewal_ v2.0
1
Download
News
Documents
Sheet Music
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS $ git git stat status us # On br bran anch ch ma mast ster er # Ch Chan ange ges s to be co comm mmit itte ted: d: #
(use (u se "git "git rese reset t HE HEAD AD
e>.. ..." ." to unst unstag age) e)
# #
modified:
example.txt
# # Ch Chan ange ges s no not t st stag aged ed fo for r co comm mmit it: : #
(use (u se "git "git add add e>.. ..." ." to updat update e wh what at will will be commi committ tted ed) )
#
(use (u se "git "git ch chec ecko kout ut -- e>.. ..." ." to di disc scar ard d ch chan ange ges s in worki working ng
irectory) irectory) # #
modified:
README.md
# # Unt Untrac racked ked fil files: es: #
(use (u se "git "git add add e>.. ..." ." to inclu include de in wh what at will will be co comm mmit itte ted) d)
# #
other.txt
Git helpfully includes instructions (in brackets/parentheses) on how to move s thing from one section to another; this can be very helpful when you can’t remember what to type! The files move between the states as we work on them
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
1
Download
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
can remove them from here too without losing our changes, as you’ll see sho Once we are happy with the collection of changes that we have added to the sta area, we commit, which is the area on the right hand side of the diagram. A com is formed from the contents of the staging area, the current timestamp, the information you added earlier and the message you supply when you creat commit. At this point, your new commit is quite literally history: it forms part o history of the project.
In real, just-a-day-at-the-office terms, git’s staging area means that we don’t to conduct our entire working life around the special needs of git. We can sit a computers, hack together a masterpiece, and then curate some good commits the work that we have done, by only adding the files we want to include in commit. It gets our workflow into a place which makes sense for developers away from working around a tool.
Assignment 1) Create a new text file in your repo; you can use your “normal” tools for this, don’t feel tied to the command line as the repo is just a normal directory with a few superpowers. 2) Run git git status status and check you can see it under untracked files. Now run git git add add [fil [file] e] with the filename of your file.
Master your3) semester with Run git status status againScribd and check that you can see the file listedunder Read Free Foron 30this Days Sign up to vote title Changes to be committed: . & The New York Times Useful Not useful Cancel anytime.
Special offer for students: Only $4.99/month. 4) Now we’re going to actually commit the change. Run git commit, and
you will be prompted to edit a file. Write a message about the change
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
Join
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
1
Download
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
I made my first git commit!
Keep Your Changes Under (Source) Control
Making commits in git means recording the changes we have made. Being expert basically means adding and committing sanely. Even if you reall rename all your template files, change the indentation level in your config direc fix a bug in the image uploader and then add a resize feature - and THEN re you should have committed - you still want to create a story about the changes made in a sane way.
It’s tempting to create a masterpiece, and then just sort of checkpoint where yo up to by committing everything you did at once, but we can do better than tha Quick Quiz: Good Commit Practices
When is a good time to commit in git? (pick as many as you like) A) Before you go for lunch B) When you’ve finished one of the steps towards the feature you’re building C) When you’ve finished a big feature When you’vewith finished a bug fix Master yourD)semester Scribd For every small change & The New E)York Times Quiz can Special offer for students: Onlyanswers $4.99/month.
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
be found at the end of the workbook
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
1
Download
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
I can create a commit with a subset of the changed files in it, leaving the o changes intact in my working directory
Study Your History with Git Log
Now you’ve made those commits, you’ve created history. It’s useful to be ab look at what has already happened on a project to understand it, and to do th use the git git log log command (go on, try it!). This shows who made which chang the past. We’ll revisit this command a few times as we learn new things with it can give us a lot of information about the commits that have been made.
Many git commands can produce output that is too long for the screen ( git do this when you’ve made more commits), so they launch their output into a p When this happens, you’ll find that you are sort of stuck in a land of log after run this command. If you’ve used programs called more or or less (unix (unix geeks love na things) then that’s what you are seeing here. If you haven’t don’t worry: press to see more content, and q to quit - that’s pretty much all you need to know.
Assignment 1) Run git git log log to see the commits you have already made. 2) Try the command again with the --stat switch to get information
Master yourabout semester Scribdin each commit which fileswith were affected Read Free Foron 30this Days Sign up to vote title & The New 3)York Times Useful Not useful For a compact view, use git git log --onel --oneline ine - this is useful when Special offer for students: Only $4.99/month.
looking at a bigger picture
Cancel anytime.
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
RSD CLG Renewal_ v2.0
1
Download
News
Documents
Sheet Music
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
Command
Shows
git diff
unstaged changes changes staged for commit all changes in this directory since the last commit, both staged and not
git diff --staged git diff HEAD
It’s useful to use git git diff diff to check what’s already been done, as well as to see is or is not included in your next commit. In git, it’s possible to stage part(s) of but not all of the changes in it, and so git diff diff is very handy there too!
For example if I change a file, and add it, then change it again, I’ll see it listed as staged and unstaged in the output: $ git git stat status us # On br bran anch ch ma mast ster er # Ch Chan ange ges s to be co comm mmit itte ted: d: #
(use (u se "git "git rese reset t HE HEAD AD e>.. ..." ." to unst unstag age) e)
# #
modified:
README.md
# # Ch Chan ange ges s no not t st stag aged ed fo for r co comm mmit it: : #
(use (u se "git "git add add e>.. ..." ." to updat update e wh what at will will be commi committ tted ed) )
# (use (u se "git "git ch chec ecko kout ut -- e>.. ..." ." to Masterirectory) your semester with Scribd irectory) & The New York Times # Special offer for # students: modiOnly fie$4.99/month. d: README.md
disc di scar ard d ch chan ange ges s in worki working ng Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
Download
News
Documents
Sheet Music
Join
RSD CLG Renewal_ v2.0
1
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS $ git git diff diff diff --git a/README.md b/README.md index index 67cda08.. 67cda08..5cc06 5cc0661 61 100644 100644 --- a/README.m a/README.md d +++ b/README.m b/README.md d @@ -1 +1,2 @@ Read Read this this +then +then this this $ git git diff diff --st --stag aged ed diff --git a/README.md b/README.md index index e69de29.. e69de29..67cda 67cda08 08 100644 100644 --- a/README.m a/README.md d +++ b/README.m b/README.md d @@ -0,0 +1 @@ +Read +Read this this $ git git diff diff HEAD HEAD diff --git a/README.md b/README.md index index e69de29.. e69de29..5cc06 5cc0661 61 100644 100644 --- a/README.m a/README.md d +++ b/README.m b/README.md d
Master @@your semester with Scribd -0,0 +1,2 @@ +Read +Read York this this Times & The New Special offer for students: Only +then +th en this thi s $4.99/month.
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
1
Download
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
Git status shows the file as staged, so she commits her work. Will Mia’s changes be included? Any of them? Why? Quiz answers can be found at the end of the workbook
Another very handy trick is to diff and add at the same time; this is one I use Running git git add add -p shows each chunk of output from git git diff diff in turn, wit option to add it! Press ? if you’re not sure which option you want; this produ more detailed help output. The other advantage advantage of this approach is that it really to spot things which should not have have been included, such as debug statements
Assignment 1) Make sure you have no outstanding changes in your repository by running git git diff diff and adding/committing changes as necessary (we’ll come back to undoing things in a moment) 2) Create a file with at least 10 lines of content in it, add and commit the file 3) Now edit this file at the beginning and at the end. Stage only one of these changes by doing git git add add -p and choosing y for one of the Master yourchanges semester with Scribd and n for the other Read Free For 30 Days Sign up to vote on this title
Use git diff to check that only one of the will committed, & The New 4)York Times Useful Notbe useful changes
Special offer for students: $4.99/month. andOnly then commit
it
Cancel anytime.
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
1
Download
Join
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
with git git add add -p, but sadly she already added the whole thing …
Enter the git git reset reset command to rescue Anya and allow her to make well-cu commits on her project. This command is destructive, so use with care! In this though, we’re only working on the staging area, to “un-add” either one or all f Command
Outcome
git reset
No changes to any project files, but any staged changes are now unstaged The named file will not be changed, changed, but will no longer be staged. No other staged changes are affected
git reset [file]
Warning
git reset reset --hard --hard, which actually throw There’s a variation on this command, git away past commits as well. Only add the --hard if you’re sure you know wh to do next! We will cover this thoroughly in later chapters, just be aware of th danger until then…
Assignment
Master your semester with Scribd Read Free Foron 30this Days Sign up to vote title 1) Make changes to one or more files in your repo. Add the files andrun & The New git York Times Useful Not useful status to check things look as you expect. Special offer for students: Only $4.99/month.
Cancel anytime.
2) Pick a file and unstage it. Then run git git status status again.
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join
Search
Home
Saved
1
87 views
Sign In
Upload
Join
RELATED TITLES
0
Git Work Book Uploaded by sandra marta
Books
Audiobooks
Magazines
Git Work Book
Save
Embed
Share
Print
1
Download
News
Documents
Sheet Music
RSD CLG Renewal_ v2.0
of 74
6 Phase of Pm Dra� Work
VB6
Search document
CONTENTS
not the only person to have made this mistake, and in fact git has a comman exactly this situation: git commit commit --amen --amend d.
This command will remove and re-stage your changes, allow you to chang commit message, and then create a new commit with the new commit mes Because it’s not actually the same commit, the commit identifier will chang don’t use use this trick if you have already pushed your changes to another repos (We haven’t covered pushing yet, so if that was an unfamiliar term, don’t worr will become clear!)
Assignment 1) Run git git log log to see the history of all the commits in this repository. We want to alter the most recent commit message. 2) Run git git commit commit --amen --amend d and you will be prompted by your editor which will allow you to edit the commit message. Then save and close the file. 3) Run git git log log again and see that both the message and the commit identifier has changed.
I know how to edit the message on a commit I just made
Master your semester with Scribd & The New York Times
Read Free Foron 30this Days Sign up to vote title
Not useful Cancel anytime.
Useful
Branch To Create A Safe Working Area
Special offer for students: Only $4.99/month.
Home
Saved
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Master your semester with Scribd & The New York Times Special offer for students: Only $4.99/month.
Upload
Sign In
Read Free For 30 Days Cancel anytime.
Join