File tree 1 file changed +27
-0
lines changed
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.
25
25
[ documentation ] : https://docs.github.com/en/get-started/quickstart/set-up-git
26
26
[ guides ] : https://guides.github.com/introduction/git-handbook/
27
27
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
+
28
55
## Prerequisites
29
56
30
57
We'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