I am an Apache Stratos committer. However, as a Technical Writer I mainly work with the Apache Stratos wiki documentation [1] and the necessity to commit anything to Apache Stratos repository had never arisen, until today. Today, I was requested to update the README.md file in the Apache Stratos repository, which appeared in [2].
The following are the steps that I used to commit and push my changes to Apache Stratos Git repository as an Apache committer:
- Set your username and password in Git [3] by using the following command:
git config --global user.name "Mariangela Hills" git config --global user.email mariangela@apache.org
- Create a new folder, so that the repository clone data can be stored it. For example, let us name this folder “Stratos4”.
- Navigate to the latter mentioned folder using the following command:
cd Stratos4 - Clone Apache Stratos repository by using the following command:
git clone https://git-wip-us.apache.org/repos/asf/incubator-stratos.git
It will take sometime for the repository to get cloned. Once it is done you will get an output similar to the following:
Cloning into 'incubator-stratos'... remote: Counting objects: 53240, done. remote: Compressing objects: 100% (19593/19593), done. remote: Total 53240 (delta 22648), reused 48533 (delta 20027) Receiving objects: 100% (53240/53240), 31.47 MiB | 129.00 KiB/s, done. Resolving deltas: 100% (22648/22648), done. Checking connectivity... done
- Navigate to the incubator-stratos/ directory
cd incubator-stratos/ - If you wish to view the folders in this directory, use the following command:
ls
The following output will appear:
DISCLAIMER NOTICE components extensions pom.xml service-stubs
LICENSE README.md dependencies features products tools - Open the README.md file in a preferred text editor, edit its content and save the file. Note that Markdown language [4] has been used in this file; therefore, if you wish to preview the output before committing it, you can use an online Markdown Editor [5].
- If you execute the following command, it will indicate that the README.md file has been modified:
git status
The following output will appear:
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: README.md
# no changes added to commit (use "git add" and/or "git commit -a") - Commit your changes to the local Git repository using the following command:
git commit -am "<MESSAGE>"
For example:
git commit -am "Updated readme.md"
The following output will appear:
[master ce923ec] Updated readme.md
1 file changed, 99 insertions(+), 88 deletions(-)
rewrite README.md (84%) - Push your changes to the main Git repository using the following command:
Git push
The following output will appear:
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
- Enter your Apache username and password as follows:
Username for 'https://git-wip-us.apache.org': <USERNAME>
Password for 'https://Mariangela@git-wip-us.apache.org': <PASSWORD> - Note that your username should be entered in simple case. The password that you enter should allow you to log into https://id.apache.org/
- If you have entered your username or password incorrectly, you will received the following message. In such an instance, execute the command in the previous step again.
fatal: Authentication failed for 'https://git-wip-us.apache.org/repos/asf/incubator-stratos.git/' - The following is the output that I received after successfully pushing my changes to the main repository.
Counting objects: 9, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 2.52 KiB | 0 bytes/s, done. Total 3 (delta 1), reused 0 (delta 0) To https://git-wip-us.apache.org/repos/asf/incubator-stratos.git fa893ee..ce923ec master -> master
- If you wish to check details on your commit together with the other recent commits, execute the following command:
git log
The following was the output that I received:
commit ce923ec3b2e95bff53ed7684211bae7211ac1c69
Author: Mariangela Hills <mariangela@apache.org>
Date: Tue Apr 1 15:38:20 2014 +0530
Updated readme.md[5] http://dillinger.io/ Photo by rawpixel.com on Unsplash
Comments
Post a Comment