File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,33 @@ please [open an issue] so we can document how to fix it.
2525[ documentation ] : https://docs.github.com/en/get-started/quickstart/set-up-git
2626[ guides ] : https://guides.github.com/introduction/git-handbook/
2727
28+ ## Quick Reference
29+
30+ Here are the most common Git commands you'll use when contributing to Rust:
31+
32+ - [ Set up repository] ( #prerequisites )
33+ ``` sh
34+ # Setup: Add upstream remote to your fork
35+ git remote add upstream https://github.com/rust-lang/rust.git
36+ ```
37+ - [ Start new work, and Keep up to date with upstream] ( #keeping-things-up-to-date )
38+ ```
39+ # Start new work
40+ git checkout master
41+ git pull upstream master --ff-only
42+ git checkout -b my-feature-branch
43+ ```
44+ - [ After resolving conflicts during rebase] ( #rebasing-and-conflicts )
45+ ```
46+ git add <resolved-files>
47+ git rebase --continue
48+ git push --force-with-lease # Update your remote branch
49+ ```
50+ - [ Prevent creating merge commits (recommended)] ( #no-merge-policy )
51+ ```
52+ git config pull.ff only
53+ ```
54+
2855## Prerequisites
2956
3057We'll assume that you've installed Git, forked [ rust-lang/rust] , and cloned the
You can’t perform that action at this time.
0 commit comments