You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

User:4nn1l2/gerrit: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>4nn1l2
imported>4nn1l2
(Removed redirect to User:4nn1l2/git)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== [[phab:T232554]] ==
{{delete|own request}}
<!--  ~/gerrit_testsite/bin/gerrit.sh restart -->
#REDIRECT [[User:4nn1l2/git]]
 
=== Cloning a repository ===
git clone "<nowiki>https://gerrit.wikimedia.org/r/operations/mediawiki-config</nowiki>" && (cd "mediawiki-config" && mkdir -p .git/hooks && curl -Lo `git rev-parse --git-dir`/hooks/commit-msg <nowiki>https://gerrit.wikimedia.org/r/tools/hooks/commit-msg</nowiki>; 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 <s>fetch</s> 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
 
== Other points ==
* Scan chapter 2 of [https://git-scm.com/book/en/v2]
** <code>git status</code> is a useful command.
** <code>git add <file></code> to stage a change (modified file) or track a new file
** <code>git checkout <file></code> to unmodify a modified file
** For updating the clone, use <code>git pull</code> rather than <code>git fetch</code>. 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
* checkout [https://en.wikipedia.org/w/index.php?title=Version_control&oldid=914420204#Common_terminology]

Latest revision as of 15:09, 26 October 2021

Gnome-user-trash-full.svg  This page is queued for deletion. Given reason: own request. Last modified: Tue, 26 Oct 2021 15:09:37 +0000.
  1. REDIRECT User:4nn1l2/git