Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: docs/using_git.md

Issue 1347153006: [Docs] Add wiki content to Markdown docs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Git repository
2
3 V8's git repository is located at https://chromium.googlesource.com/v8/v8.git
4
5 V8's master branch has also an official git mirror on github: http://github.com/ v8/v8-git-mirror.
6
7 **Don't just `git-clone` either of these URLs** if you want to build V8 from you r checkout, instead follow the instructions below to get everything set up corre ctly.
8
9 ## Prerequisites
10
11 1. **Git**. To install using `apt-get`:
12 ```
13 apt-get install git
14 ```
15 1. **depot\_tools**. See [instructions](http://dev.chromium.org/developers/how -tos/install-depot-tools).
16 1. For **push access**, you need to setup a .netrc file with your git password :
17 1. Go to https://chromium.googlesource.com/new-password - login with your co mmitter account (e.g. @chromium.org account, non-chromium.org ones work too). No te: creating a new password doesn't automatically revoke any previously created passwords.
18 1. Follow the instructions in the "Staying Authenticated" section. It would ask you to copy-paste two lines into your ~/.netrc file.
19 1. In the end, ~/.netrc should have two lines that look like:
20 ```
21 machine chromium.googlesource.com login git-yourusername.chromium.org password < generated pwd>
22 machine chromium-review.googlesource.com login git-yourusername.chromium.org pas sword <generated pwd>
23 ```
24 1. Make sure that ~/.netrc file's permissions are 0600 as many programs refu se to read .netrc files which are readable by anyone other than you.
25
26
27 ## How to start
28
29 Make sure depot\_tools are up-to-date by typing once:
30
31 ```
32 gclient
33 ```
34
35
36 Then get V8, including all branches and dependencies:
37
38 ```
39 fetch v8
40 cd v8
41 ```
42
43 After that you're intentionally in a detached head state.
44
45 Optionally you can specify how new branches should be tracked:
46
47 ```
48 git config branch.autosetupmerge always
49 git config branch.autosetuprebase always
50 ```
51
52 Alternatively, you can create new local branches like this (recommended):
53
54 ```
55 git new-branch mywork
56 ```
57
58 ## Staying up-to-date
59
60 Update your current branch with git pull. Note that if you're not on a branch, g it pull won't work, and you'll need to use git fetch instead.
61
62 ```
63 git pull
64 ```
65
66 Sometimes dependencies of v8 are updated. You can synchronize those by running
67
68 ```
69 gclient sync
70 ```
71
72 ## Sending code for reviewing
73
74 ```
75 git cl upload
76 ```
77
78 ## Committing
79
80 You can use the CQ checkbox on codereview for committing (preferred). See also t he [chromium instructions](http://www.chromium.org/developers/testing/commit-que ue) for CQ flags and troubleshooting.
81
82 If you need more trybots than the default, add the following to your commit mess age on rietveld (e.g. for adding a nosnap bot):
83
84 ```
85 CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_rel
86 ```
87
88 To land manually, update your branch:
89
90 ```
91 git pull --rebase origin
92 ```
93
94 Then commit using
95
96 ```
97 git cl land
98 ```
99
100 # For project members
101
102
103 ## Try jobs
104
105 ### Creating a try job from codereview
106
107 1. Upload a CL to rietveld.
108 ```
109 git cl upload
110 ```
111 1. Try the CL by sending a try job to the try bots like this:
112 ```
113 git cl try
114 ```
115 1. Wait for the try bots to build and you will get an e-mail with the result. You can also check the try state at your patch on codereview.
116 1. If applying the patch fails you either need to rebase your patch or specify the v8 revision to sync to:
117 ```
118 git cl try --revision=1234
119 ```
120
121 ### Creating a try job from a local branch
122
123 1. Commit some changes to a git branch in the local repo.
124 1. Try the change by sending a try job to the try bots like this:
125 ```
126 git try
127 ```
128 1. Wait for the try bots to build and you will get an e-mail with the result. Note: There are issues with some of the slaves at the moment. Sending try jobs f rom codereview is recommended.
129
130 ### Useful arguments
131
132 The revision argument tells the try bot what revision of the code base will be u sed for applying your local changes to. Without the revision, our LKGR revision is used as the base (http://v8-status.appspot.com/lkgr).
133 ```
134 git try --revision=1234
135 ```
136 To avoid running your try job on all bots, use the --bot flag with a comma-separ ated list of builder names. Example:
137 ```
138 git try --bot=v8_mac_rel
139 ```
140
141 ### Viewing the try server
142
143 http://build.chromium.org/p/tryserver.v8/waterfall
144
145 ### Access credentials
146
147 If asked for access credentials, use your @chromium.org email address and your g enerated password from [googlecode.com](http://code.google.com/hosting/settings) .
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698