Revision Control and git Flashcards

1
Q

Introduction:

  • Sometimes called _______ ______ ______ (VCS)
  • _____ of any good software development
  • Typically keeps track of _______ (deltas) of files
  • Files are checked in and checked out from a ______
A
  • Sometimes called version control system (VCS)
  • Basis of any good software development
  • Typically keeps track of differences (deltas) of files
  • Files are checked in and checked out from a repository
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Simple:

$ mkdir RCS

$ ci -l lorem.1

RCS/lorem.1,v <– lorem.1

enter description, terminated with single ‘.’ or end of file:

NOTE: This is NOT the log message!

>> .

initial revision: 1.1

done

$ vi lorem.1

A

$ mkdir RCS

$ ci -l lorem.1

RCS/lorem.1,v <– lorem.1

enter description, terminated with single ‘.’ or end of file:

NOTE: This is NOT the log message!

>> .

initial revision: 1.1

done

$ vi lorem.1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What To Do:

  • Every time you have something running, ____ it in
  • Every time before you make a significant ______, check it in
  • Every ____ ____ or so, check it in
  • Now you’ll know what you _____
A
  • Every time you have something running, check it in
  • Every time before you make a significant change, check it in
  • Every half hour or so, check it in
  • Now you’ll know what you broke
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

History – Local Store:

•____ ____ ______ _______

–SCCS

–Early: 1972

–Store first version and then all deltas

•________ _________ _________

–More functionality than SCCS

–Store most recent and then deltas to go ______

A

•Source Code Control System

–SCCS

–Early: 1972

–Store first version and then all deltas

•Revision Control System

–More functionality than SCCS

–Store most recent and then deltas to go backwards

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

History – Client/Server:

•_______ users have access

–Either file _______ or merging of diffs

•_________ _________ _________

–Originally built on top of RCS

•_________

–Inspired by CVS

A

•Multiple users have access

–Either file locking or merging of diffs

•Concurrent Version System

–Originally built on top of RCS

•Subversion

–Inspired by CVS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Commercial:

IBM® ClearCase® is an enterprise-grade __________ _____________ __________ that provides highly secure version ________with work and build __________ support..

A

IBM® ClearCase® is an enterprise-grade configuration management system that provides highly secure version control with work and build management support.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Commercial:
Perforce is a commercial, proprietary ______ ______ ________- developed by Perforce Software.

A

Perforce is a commercial, proprietary revision control system developed by Perforce Software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Commercial:

Microsoft Visual SourceSafe (VSS) is a discontinued source _______ _________, oriented towards small software development projects. Like most source control systems, SourceSafe creates avirtual library of computer files. While most commonly used for source code, SourceSafe can handle any type of file in its database, but older versions were shown[1][2] to be unstable when used to store large amounts of non-textual data such as images, and compiled executables.

A

Microsoft Visual SourceSafe (VSS) is a discontinued source control program, oriented towards small software development projects. Like most source control systems, SourceSafe creates avirtual library of computer files. While most commonly used for source code, SourceSafe can handle any type of file in its database, but older versions were shown[1][2] to be unstable when used to store large amounts of non-textual data such as images, and compiled executables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Distributed/P2P:
•Mercurial:

Mercurial is a free, distributed ________ _______ ____________ tool. It efficiently handles _______ of any size and offers an easy and intuitive interface.

A

Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Distributed/P2P:
Git is a widely-used _____ ___ ________ system for software development. It is a distributed revision control system with an emphasis on _____, ___ integrity,[7] and support for distributed, non-linear workflows.[8] Git was initially designed and developed in 2005 by Linux kerneldevelopers (including Linus Torvalds) for Linux kernel development.

A

Git (/ɡɪt/[5]) is a widely-used source code management system for software development. It is a distributed revision control system with an emphasis on speed,[6] data integrity,[7] and support for distributed, non-linear workflows.[8] Git was initially designed and developed in 2005 by Linux kerneldevelopers (including Linus Torvalds) for Linux kernel development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Branches, Merges, Tags:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Git It?

  • Sourceforge and CVS ______ very popular for open-source projects.
  • Git and GitHub becoming very popular

–GitHub site written in ___

•Git attempts to keep most operations local

–Faster

–Works when _________

A
  • Sourceforge and CVS initially very popular for open-source projects.
  • Git and GitHub becoming very popular

–GitHub site written in RoR

•Git attempts to keep most operations local

–Faster

–Works when disconnected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Continued:

  • Git based on _______, not deltas
  • Every check in creates a “new” set of files

–If a files hasn’t been changed, just a link to existing file

•”Like a mini filesystem”

A
  • Git based on snapshots, not deltas
  • Every check in creates a “___” set of files

–If a files hasn’t been changed, just a link to existing file

•”Like a ___ _______”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Traditional Versioning:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Snapshot:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Three States:

•Committed

–In the local _______

•________

–Changed from the _______ in the local _________

•Staged

–Ready to _________

A

•Committed

–In the local database

Modified

–Changed from the version in the local database

•Staged

–Ready to commit

17
Q

Three States

A
18
Q

More

  • If there is a preexisting ______, one can ______ it
  • Status will tell you which______ you are on and the files you’ve changed

–”master”

•”git rm”, “git mv”, “git log”

A
  • If there is a preexisting repository, one can clone it
  • Status will tell you which branch you are on and the files you’ve changed

–”master”

•”git rm”, “git mv”, “git log”

19
Q

Remote:

  • “git remote”
  • “git remote add”
  • “git push”

–Send your ______

•”git fetch”

–Get other people’s ______

•“git pull”

–Get other people’s changes and merge

A
  • “git remote”
  • “git remote add”
  • “git push”

–Send your changes

•”git fetch”

–Get other people’s changes

•“git pull”

–Get other people’s changes and merge

20
Q

Tags:

•”git tag”

–Often used for release versions

A

•”git tag”

–Often used for release versions

21
Q

Branching, Initially:

A
22
Q

git branch testing

A
23
Q

Switching

A
24
Q

git checkout testing:

A
25
Q

Commands:

$ git branch _____

$ git checkout ______

Switched to ______ ‘testing’

$ git status

On branch testing

nothing to commit, working ______ clean

A

$ git branch testing

$ git checkout testing

Switched to branch‘testing’

$ git status

On branch testing

nothing to commit, working directory clean

26
Q

Work on Branch

$ git status

On branch testing

Changes not ______ for commit:

(use “git add <file>..." to update what will be committed)</file>

(use “git checkout – <file>..." to discard changes in working directory)</file>

modified: lorem.1

no changes added to commit (use “git add” and/or “git commit -a”)

$ git commit -a -m ‘done testing’

[testing 40ebc5f] done testing

1 file changed, 1 insertion(+), 1 deletion(-)

A

$ git status

On branch testing

Changes not staged for commit:

(use “git add <file>..." to update what will be committed)</file>

(use “git checkout – <file>..." to discard changes in working directory)</file>

modified: lorem.1

no changes added to commit (use “git add” and/or “git commit -a”)

$ git commit -a -m ‘done testing’

[testing 40ebc5f] done testing

1 file changed, 1 insertion(+), 1 deletion(-)

27
Q

Merge:

$ git checkout _____

Switched to branch ‘master’

$ git merge testing

Updating 02dd1d8..40ebc5f

Fast-forward

lorem.1 | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

$ git status

On branch master

nothing to commit, working directory clean

$ git branch -d testing

Deleted branch ______ (was 40ebc5f).

A

$ git checkout master

Switched to branch ‘master’

$ git merge testing

Updating 02dd1d8..40ebc5f

Fast-forward

lorem.1 | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

$ git status

On branch master

nothing to commit, working directory clean

$ git branch -d testing

Deleted branch testing (was 40ebc5f).

28
Q
A
29
Q
A
30
Q
A