From 234d3502492363fae57ec3bf0b26f47eb59dd209 Mon Sep 17 00:00:00 2001 From: Tom Ritchford Date: Wed, 8 May 2024 19:54:38 +0200 Subject: [PATCH] Add "Delete a branch" and simplified the language a bit. --- PyTorch-Basics.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/PyTorch-Basics.md b/PyTorch-Basics.md index c1e9233..ab27ccb 100644 --- a/PyTorch-Basics.md +++ b/PyTorch-Basics.md @@ -37,16 +37,22 @@ USE_KINETO=0 BUILD_CAFFE2=0 USE_DISTRIBUTED=0 USE_NCCL=0 BUILD_TEST=0 USE_XNNPAC The head of the pytorch/pytorch master branch may have test failures ([see here for the current state](https://hud.pytorch.org/)). When developing PyTorch, instead of branching off of `master`, you can branch off of `viable/strict`. `viable/strict` is a branch that lags behind master and guarantees that all PyTorch tests are passing on the branch. Basing your work off of `viable/strict` gives you confidence that any test failures are actually your code's fault. -Some quick git tips: +Some quick git tips on maintaining feature branches: ``` -# Creating a new feature branch off of viable/strict +# These tips assume upstream points to pytorch/pytorch. (Some people develop with origin pointing to pytorch/pytorch.) + +# Create a new branch from upstream/viable/strict git fetch upstream viable/strict git checkout -b my_new_feature upstream/viable/strict git push -u origin my_new_feature -# Rebasing your work to appear on top of viable/strict, assuming upstream points to pytorch/pytorch. -# (Some people develop with origin pointing to pytorch/pytorch) +# Rebase work on a branch to appear on top of viable/strict git pull --rebase upstream viable/strict + +# Delete a branch +git checkout main +git branch -D my_new_feature +git push --delete origin my_new_feature ``` ### For more details