Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

• If you're using a Fork & Pull Model, Pull Requests provide a way to notify

project maintainers
about the changes you'd like them to consider.
• If you're using a Shared Repository Model, Pull Requests help start code review
and
conversation about proposed changes before they're merged into the main branch.

• By incorporating specific keywords into the text of your Pull Request,


you can associate issues with code. When your Pull Request is merged,
the related issues can also close.

• Pull requests are commonly used by teams and organizations collaborating using
the Shared Repository Model.

*Branch policies:*
• Critical branches like "main" need to be protected, Azure DevOps provides
policies for that.
• e.g. Require PR to make any changes(Can't directly push changes to the protected
branches)
• e.g. Minimum number of reviewers(PR Requires a minimum no. of reviewers to give
their approval)

*Shallow clone*
• If you don't need the whole git history in your local repo, make a shallow clone
instead of a clone.
• More memory efficient and faster to sync.
#specify the depth(how many previous commits to retain)
git clone --depth [depth] [url]

*Purge Repo History*


• Purge/erase a repo's history if you want to:
1. Reduce the size of a very large repo.
2. Remove a large file that was accidentally uploaded.
3. Remove a sensitive file that was accidentally uploaded.

• There are 2 main tools for this:


*1. git filter-repo*: Rewrites history

*2. bfg*: Deletes a file by name


bfg --delete-files file_I_should_not_have_committed

You might also like