CS代考 VERSION CONTROL USING GIT

VERSION CONTROL USING GIT
Andrew University
Computer Science Dept.

Copyright By PowCoder代写 加微信 powcoder

VERSION CONTROL WHAT IS GIT/VCS?
Tracks changes (history, go back/revert) Encourages collaboration
You need this understand GIT and use it.

CREATOR LINUX TORVALD
Started in 2005 when he was working on the Linux kernel

REASONING OR PURPOSE
Before VCS were readily available folks … would simply create copies of their assets.

LOCALLY: YOU HAVE YOUR OWN VERSIONS
~:>git clone

DISTRIBUTED VERSION CONTROL

COMPARING AGAINST CENTRALIZED VCS

WHAT GIT DOES: SNAPSHOTS

THE 3 STATES IN GIT
Modified, Staged

EDIT -> COMMIT -> PUSH;

Means to copy a repo to your local computer

Git status tells you what files are being tracked and untracked.
It also will tell you what has changed with your tracked files.
STATUS, PLEASE?

STATUS, PLEASE?

GIT CHECKOUT
If you do a checkout, then your local will be the same as the last person’s push to the server.
It does not merge the changes you have locally.

You use the git pull command to
automatically fetch and then merge
that remote branch into your current branch

When you start your repo with git init, by default, you have the ‘master’ branch

SECOND EXAMPLE

ADDING FILES
To add a new file use git add –m ‘message goes here’

GIT COMMIT
The git commit takes the staged snapshot and commits it to the project history

YOU MUST ADD TO COMMIT
Any files you created or modified that you
haven’t run git
add since you edited
them won’t go into the commit

BEFORE AND AFTER

PUSH ~ UPLOAD
If someone pushed their changes before you did, you’ll have to fetch their work first and merge it into
yours. The push will be rejected if there are conflicts

Once you believe you changes are tested and ‘good-to- go’, then you push to a server that other folks can grab your pushed changes.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com