Git, Project Management, Linux, and Regex Essentials
Classified in Design and Engineering
Written at on English with a size of 210.28 KB.
Git Commands and Concepts
Git key commands and concepts:
add
(stage changes)commit
(with a message)head
(most recent commit)branch
(alternative history)checkout
(enter/exit branch)merge
(combine into master)stash
(save without commit, -u for untracked files; latest stashes (0) at the top)pop
(retrieve a stash)fork
(copy code from the source into a repository)pull
(pull remote changes and merge into master)revert
(undo commits and create a new commit)log
(history with most recent commits first, -p for patch details)rm
(--cached to remove from staging)fetch
(get changes from a remote repository to a local repository without merging them; useful for reviewing changes)pull
(fetch + merge)rebase
(create a clean/linear commit history by moving commits of one branch on top of another)
Project Management Fundamentals
Key factors:
- Assign a Project Manager (PM)
- Manage Scope/Requirement Changes
- Maintain Good Communication
Agile Principles:
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- Responding to change over following a plan
Agile Practices:
- Focus on the customer
- Iterative and incremental delivery
- Experimentation and adaptation
- Self-organization
- Continuous improvement
Scrum Framework
- Sprints: Maximum of 4 weeks; 5-9 people.
- Daily Scrum: 15 minutes maximum; All-Stand.
- Scrum Master: Facilitates the process, does not assign daily tasks.
- Retrospective: Team reviews the process.
Project Requirements
- Functional Requirements: "What" (Users' view) - Describe user expectations; documented by use cases.
- Non-functional Requirements: "How" (Developers' View) - Describe how the system should behave; tie use cases to technical implementation.
- Use Case: A story about how an end-user interacts with the system under specific circumstances.
- User Stories: Description of a feature; requirements; acceptance criteria confirm when a story is complete.
- Epic: A large, general task that can be broken down into smaller user stories; hard to estimate. Format: "As a [user], I want to [action] so I can [benefit]".
- Story Points: A relative measure to assess the size of a user story (ranking system).
Linux Commands
Essential Linux commands:
pwd
(print working directory)cd
(change directory)ls
(list directory contents)cp
(copy)rm
(delete file)mv
(move)mkdir
,rmdir
(remove directory)chmod
(make a file executable, change permissions)-r
(recursive option for removing files from folders)
Shell and Paths
- Shell: A user program that provides an interface to use OS services.
- Relative Paths:
- Current directory (
.
) - Parent directory (
..
)
- Current directory (
File Manipulation Commands
cat
(display file contents)more
(display file contents in a user-friendly manner)head
(display the first lines of a file)tail
(display the last lines of a file)wc
(count lines, words, and characters in a file)grep
(globally search a regular expression and print)sort
(sort lines of text)uniq
(filter out repeated lines)cut
(cut out selected portions of each line)tee
(send data to both a file and standard output)
Piping and Redirection
- Piping (|): Connect the output of one process to the input of another.
- VIM:
- Starts in command mode.
i
for insert mode.:
for last-line mode.:w
(write to file):q
(exit editor):q!
(quit without saving)
echo
(print to a file/terminal)>>
(append to a file)>
(overwrite a file)
Regular Expressions (Regex)
Regex is a special text string for describing a search pattern.
Version Control Systems
Distributed version control systems are preferred over centralized ones.
- Repository: A version-controlled collection of files/code.
- Revision: A specific version of a repository/file.
- Tag: A logically named/labeled version.
- Diff: The set of changes between two revisions.