Loading, please wait ...
Open its course - Git
Best Practices By Subject Expert Admin
Summary

Summary

0
Teachers with
Subject Expert Admin
0
Followers
For Learning
All
Visibility
Security Status
0
Contributions
By Teachers
Notes
  1. Students are auto-evaluated against related topics to ensure they learned it.

Follow the following best practices while working with Git.

Commits should be Small and Isolated 

When coding away, its good to group the changes into small isolated commits. Ideally each would compile, but that's not super important as long as the entire PR compiles. The benefits to small commits are: 
  • It's very easy for reviewers to review logical pieces of the PR one at a time 
  • It allows for grouping refactoring & formatting into their own commits, so that reviewers can review each commit individually without needing to see the formatting in the full diff 
  • Grouping things into small commits forces me to re-think & re-review the changes before I ask others to. I often catch things in this phase which avoid wasted back & forth in the review process 
  • It makes it easier to create helpful commit messages explaining why changes were needed. This is crucial for when we need to go back and see why a change was made, either because it has issues, or because we want to modify the code in the future, but need to know why specific changes were needed 
  • Smaller commits makes it more difficult for unintended changes to sneak into a PR 
  • It makes it easier to do a git bisect to identify a specific commit which introduced an issue (this only works if the commits compile)

×

Best Practices Evaluation

To earn PASS status, system is about to evaluate you using multiple choice questions (MCQs) and True/False type questions.

  • CAREFULLY READ THE FOLLOWING INSTRUCTIONS!
  • Make sure you have learned this lecture along with its topics and tutorials.
  • On first evaluation you get 100% marks on correct answer, then on 2nd you get 95% marks and so on.
  • Answer the questions with a gap NOT MORE THAN A MINUTE, Otherwise it will re-start.

I have read above instrucitons and ready for evaluation.
Your's
Status
Not Registered
Teacher
Subject Expert Admin
TODO
Please ask your teacher to link related questions for this lecture.
Alert
Your performance monitoring will start when you register in a class of this course.

Questions on

No Linked topics!
Contact Us

support@subexpert.com
Write to Us View Help
Subject Expert Logo

Subject Expert

Learn, Evaluate and Optimize

Follow Us
Facebook Switch Display Mode Enable Translation
© 2024 - Subject Expert