Podcast
Questions and Answers
What is the first step when performing a rebase in git?
What is the first step when performing a rebase in git?
What is the primary difference between Kanban and Scrum methodologies in Azure Boards?
What is the primary difference between Kanban and Scrum methodologies in Azure Boards?
Which statement is true regarding merging and rebasing?
Which statement is true regarding merging and rebasing?
How do you remove an untracked file in Git?
How do you remove an untracked file in Git?
Signup and view all the answers
Which of the following best describes the Single Responsibility Principle?
Which of the following best describes the Single Responsibility Principle?
Signup and view all the answers
Which design pattern is characterized by a single instance being created and shared throughout the application?
Which design pattern is characterized by a single instance being created and shared throughout the application?
Signup and view all the answers
What does the 'git pull' command do?
What does the 'git pull' command do?
Signup and view all the answers
Which Git command is used for combining different changes from branches into a new commit?
Which Git command is used for combining different changes from branches into a new commit?
Signup and view all the answers
Under the Git Flow model, what role does the Hotfix branch serve?
Under the Git Flow model, what role does the Hotfix branch serve?
Signup and view all the answers
What happens in a fast-forward merge in Git?
What happens in a fast-forward merge in Git?
Signup and view all the answers
Study Notes
Git Rebase
- Checkout to another branch using
git checkout some-feature
. - Start rebasing a branch with
git rebase main
. - Rebasing simplifies commit history, avoiding clutter from merge commits.
- Never rebase branches that are pushed to public repositories.
Git Fetch and Pull
-
git fetch
downloads updates from a remote repository, without merging. - Use
git pull
as a shortcut for fetching and merging simultaneously.
Git Workflows
- Centralized Workflow: Developers work locally, then merge and push code to a shared central repository.
- Integrator Workflow: Organizes changes from multiple developers into one main project.
-
Git Flow:
- Main: Contains only tagged releases.
- Develop: Ongoing work branch.
- Feature: Created from develop for new features.
- Release: Polished candidates ready for merging into Main.
- Hotfix: Branch created from Main to fix user-reported errors and merged back into both Main and Develop.
SOLID Principles
- Single Responsibility: Classes should have one purpose.
- Open/Closed Principle: Classes should be extendable without modifying existing code.
- Liskov Substitution: Subclasses must replace base classes without altering expected behavior.
- Interface Segregation: Interfaces should be split to avoid unnecessary dependencies.
- Dependency Inversion: High-level modules should rely on abstractions rather than specifics.
Azure Tools
- Azure Boards: Kanban for flow and flexibility, as opposed to Scrum's time-bound sprints.
- Azure Pipelines: CI/CD service.
- Azure Repos: Source control system linking to other Azure tools.
- Azure Test Plans: Manage testing and quality assurance.
- Azure Artifacts: Manage packages and dependencies.
Design Patterns
- Strategy Pattern: Encapsulates algorithms.
- Observer Pattern: Allows one-to-many dependencies between objects.
- Factory Pattern: Defines an interface for creating an object but lets subclasses alter the type.
- Command Pattern: Turns requests into objects.
- Decorator Pattern: Attaches additional responsibilities to an object.
- Template Method Pattern: Defines the program skeleton but allows subclasses to override specific steps.
- Singleton Pattern: Ensures a class has only one instance with a global access point.
Git Basics
- Created by Linus Torvalds.
-
Configuration Levels:
-
System-level:
git config --system
. -
User-level:
git config --global
. -
Repository-level:
git config
.
-
System-level:
-
Staging Area: Select files for commit, check status with
git status
. -
Commit Changes: Inspect with
git log
, tag them withgit tag
.
Undoing Changes in Git
- Undo modified but unstaged files:
git checkout HEAD -- <filename>
. - Undo staged changes:
git reset HEAD -- <filename>
. - Undo all changes (staged and unstaged):
git reset HEAD --hard
. - Remove untracked files:
git clean -f
. - Undo the last commit locally:
git reset HEAD~1
. - Revert a commit without deleting it:
git revert <commit-hash>
. - Amend previous commit:
git commit –amend
.
Branch Management in Git
- Create and checkout a new branch:
git checkout -b <branch-name>
. - Create a branch without switching:
git branch <branch-name>
. - Delete a local branch:
git branch -d <branch-name>
. - Delete a remote branch:
git push origin --delete <branch-name>
. - Switch to an existing branch:
git checkout <branch-name>
.
Merging in Git
- Fast Forward Merge: Moves branch pointer up with no side changes.
- 3-Way Merge: Combines changes from different branches into a new commit when there are conflicting changes.
DevOps Overview
- Definition: Integration of people, processes, and products for continuous delivery of value.
-
Goals in DevOps:
- Assemble the right team with needed skills.
- Use clear and efficient work methods.
- Deliver valuable outcomes to customers.
- Foundations: Collaboration, Automation, Continuous Monitoring, Integration, Delivery, and Testing.
Benefits of DevOps
- Enhanced speed and rapid delivery of applications.
- Improved reliability and scalability.
- Greater collaboration and security for development teams.
Azure DevOps
- A Software As A Service (SaaS) offering with features for managing development processes and projects efficiently.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz covers the essential concepts of rebasing in Git, including how to rebase a branch and the differences between rebasing and merging. Learn about workflows, fetching branches, and the implications of working with public repositories. Test your understanding of managing branches effectively.