You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org
User:4nn1l2/gerrit: Difference between revisions
imported>4nn1l2 |
imported>4nn1l2 |
||
Line 40: | Line 40: | ||
pass: generate | pass: generate | ||
== [[phab:T230480]] == | |||
cd mediawiki-config/ | |||
git status | |||
git pull | |||
git status | |||
cd wmf-config/ | |||
gedit InitialiseSettings.php | |||
git status | |||
git add InitialiseSettings.php | |||
git status | |||
git commit | |||
NEW WINDOW | |||
Add support for some languages on Commons | |||
Bug: T230480 | |||
git push origin HEAD:refs/for/master | |||
nn1l2 | |||
GENERATE | |||
HAD TO ABANDON 2 UNWANTED COMMITS! | |||
REBASE | |||
---- | |||
-1 BY A CODE-REVIEWER | |||
git status | |||
YOUR BRANCH IS AHEAD OF 'ORIGIN/MASTER' BY 5 COMMITS. | |||
git reset --hard origin/master [https://stackoverflow.com/questions/16288176/your-branch-is-ahead-of-origin-master-by-3-commits] | |||
git status | |||
UPTODATE | |||
git fetch "https://gerrit.wikimedia.org/r/operations/mediawiki-config" refs/changes/64/536764/2 && git checkout FETCH_HEAD | |||
gedit InitialiseSettings.php | |||
git add InitialiseSettings.php | |||
git commit --amend | |||
git push origin HEAD:refs/for/master | |||
== Other points == | == Other points == | ||
Line 49: | Line 110: | ||
* Scan chapter 1 of the same book | * Scan chapter 1 of the same book | ||
**Snapshots not diffs | **Snapshots not diffs | ||
** Three states that files can reside in: 1) modified; 2)staged; 3)committed. Three main sections of a Git project: 1) working directory; 2) staging area; 3) git directory. | ** Three states that files can reside in: 1) modified; 2) staged; 3) committed. Three main sections of a Git project: 1) working directory; 2) staging area; 3) git directory. | ||
**استیچ به معنی سکو است، سکویی برای | **<span dir=rtl>استیچ به معنی سکو است، سکویی برای پرتاب شدن به جای بهتر/بهشت (گیت دیرکتوری)، سکویی که اعضایش دستچین شدهاند. ورکینگ دیرکتوری (سندباکس) پایینترین سطح و محلی است که همهجور کار (از کثیف تا تمیز) باید انجام شود تا در نهایت تمیزها به استیج بروند و شاید به بهشت (گیت دیرکتوری) رسیدند!</span> | ||
** "check out" in this context most probably means "prove to be true or correct" [example: "his claims simply did not check out"], but I'm not sure! | ** "check out" in this context most probably means "prove to be true or correct" [example: "his claims simply did not check out"], but I'm not sure! | ||
* commit = check in | * commit = check in | ||
* working directory = sandbox | |||
* checkout [https://en.wikipedia.org/w/index.php?title=Version_control&oldid=914420204#Common_terminology] | * checkout [https://en.wikipedia.org/w/index.php?title=Version_control&oldid=914420204#Common_terminology] |
Revision as of 13:45, 15 September 2019
phab:T232554
Cloning a repository
git clone "https://gerrit.wikimedia.org/r/operations/mediawiki-config" && (cd "mediawiki-config" && mkdir -p .git/hooks && curl -Lo `git rev-parse --git-dir`/hooks/commit-msg https://gerrit.wikimedia.org/r/tools/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg)
Making the change
gedit InitialiseSettings.php
Staging the change
git add wmf-config/InitialiseSettings.php
Committing the change
git commit
Updating the remote repository
git push origin HEAD:refs/for/master
username: nn1l2
pass: generate
phab:T232657
Updating the local repository
git fetch pull
Making the change
gedit InitialiseSettings.php
Staging the change
git add InitialiseSettings.php
Committing the change
git commit
Updating the remote repository
git push origin HEAD:refs/for/master
username: nn1l2
pass: generate
phab:T230480
cd mediawiki-config/
git status
git pull
git status
cd wmf-config/
gedit InitialiseSettings.php
git status
git add InitialiseSettings.php
git status
git commit
NEW WINDOW
Add support for some languages on Commons
Bug: T230480
git push origin HEAD:refs/for/master
nn1l2
GENERATE
HAD TO ABANDON 2 UNWANTED COMMITS!
REBASE
-1 BY A CODE-REVIEWER
git status
YOUR BRANCH IS AHEAD OF 'ORIGIN/MASTER' BY 5 COMMITS.
git reset --hard origin/master [1]
git status
UPTODATE
git fetch "https://gerrit.wikimedia.org/r/operations/mediawiki-config" refs/changes/64/536764/2 && git checkout FETCH_HEAD
gedit InitialiseSettings.php
git add InitialiseSettings.php
git commit --amend
git push origin HEAD:refs/for/master
Other points
- Scan chapter 2 of [2]
git status
is a useful command.git add <file>
to stage a change (modified file) or track a new filegit checkout <file>
to unmodify a modified file- For updating the clone, use
git pull
rather thangit fetch
. The first one will download and merge, but the second one only downloads (changes unstaged).
- Scan chapter 1 of the same book
- Snapshots not diffs
- Three states that files can reside in: 1) modified; 2) staged; 3) committed. Three main sections of a Git project: 1) working directory; 2) staging area; 3) git directory.
- استیچ به معنی سکو است، سکویی برای پرتاب شدن به جای بهتر/بهشت (گیت دیرکتوری)، سکویی که اعضایش دستچین شدهاند. ورکینگ دیرکتوری (سندباکس) پایینترین سطح و محلی است که همهجور کار (از کثیف تا تمیز) باید انجام شود تا در نهایت تمیزها به استیج بروند و شاید به بهشت (گیت دیرکتوری) رسیدند!
- "check out" in this context most probably means "prove to be true or correct" [example: "his claims simply did not check out"], but I'm not sure!
- commit = check in
- working directory = sandbox
- checkout [3]