git fetch

pull = fetch + merge origin/master

What is “git fetch”?
For git, there are two repositories: remote and local. Fetch is a command that brings the latest information from the remote repository to the local repository. Fetching does not mean that the file is updated like pull. Only the local repository is updated.

[vagrant@localhost test]$ git –version
git version 1.7.1
[vagrant@localhost test]$ git clone
Initialized empty Git repository in /home/vagrant/local/app/test/test/test/.git/
remote: Enumerating objects: 45, done.
remote: Total 45 (delta 0), reused 0 (delta 0), pack-reused 45
Unpacking objects: 100% (45/45), done.
[vagrant@localhost test]$ ls

[vagrant@localhost test]$ git log origin/master
commit e4c42320159a32a377eb60249f9d5277f809c1bd
Author: githubix <>
Date: Mon Jul 1 23:16:01 2019 +0900

Update test.php

commit 180cf3fcce48d905ede71a57ed0bd3973e1f90c8
Author: githubix <>
Date: Mon Jan 28 08:45:42 2019 +0900

Update test.php

commit 812d49e3beb82bafe3699787ade3de5bf5d2f48f
Author: githubix <>
Date: Fri Jan 25 09:09:15 2019 +0900

Update test.php

commit 5b3c59d4795b3a73e8723b35ffa58b2a6c262974

[vagrant@localhost test]$ git fetch –all
Fetching origin



What is
A tool that can visualize GitHub issues and pull requests as signs. By making the status of Issue and Pullrequest into a signboard, it becomes possible to grasp each progress on one screen.${Github usename}/${Github repository name}

You can use Waffle simply by accessing in this way.


Github japan

Github japan
大門から歩いて7~8分くらい。東京タワーの目の前。しかし、お世辞にもいい場所とは言えないな。何故、浜松町?渋谷、六本木、新宿などの方がしっくりくるんだが。。と、オフィスとしてはあまりいいとこナシのGithub japanでした。


git diff

First of all, as a basic concept of git diff, the basic behavior of “git diff” is “display of changes made in the working tree”.

Then, if you do not specify the comparison source, you can specify “comparison source” as an argument, but by default, the difference when compared with “index” → ”working tree” with “index” as the comparison source and it will display.

[vagrant@localhost tests]$ git diff
diff –git a/sample.txt b/sample.txt
deleted file mode 100644
index 106287c..0000000
— a/sample.txt
+++ /dev/null
@@ -1 +0,0 @@
-Hello Git!
diff –git a/tests/test b/tests/test
— a/tests/test
+++ b/tests/test
@@ -1 +1 @@
-Subproject commit 180cf3fcce48d905ede71a57ed0bd3973e1f90c8
+Subproject commit 180cf3fcce48d905ede71a57ed0bd3973e1f90c8-dirty
[vagrant@localhost tests]$ git diff –name-only


[vagrant@localhost test]$ git diff –name-only
[vagrant@localhost test]$


Roll back git remote repository

Those that pushed to the remote repository can not be rewound to the past state, or other members may start working. (It is possible to use supplementary git reset)
Roll back by executing the following command and pushing the processing opposite to the pushed contents.

git revert <commit id>
git revert bd912e1

When if it is merged, execute the command.

git revert-m 1 <commit_ID>
git revert-m 1 bd912e1

Create a folder with Github

Since GitHub had only file creation, I did not know how to create it.

But we will make folders from file creation.
follow circleci project step below.

Create a folder named .circleci and add a fileconfig.yml (so that the filepath be in .circleci/config.yml).

In this case, add “/” to the tail of text. Therefore, text should be “.circleci/” from “.crcileci”.

Then, automatically new folder has created.

Well done, let’s make sure not to create files trying to make folders.





git rm –cachedで追跡対象から外して、そのファイルを.gitignoreに加えればよいでしょう。

Git ソースツリー(source tree)とは

Git操作はコマンドラインではなかなか作業が見にくいのですが、Git ソースツリーでは、今誰が、どのファイルを、どのように編集しているかを視覚化して見えやすいようにすることができます。

細かい操作はコマンドの方が早い などのデメリットもあるようです。

Git tag(タグ)って何?

ねーねー、これGit Tagらしいよ。

あー知ってる、知ってる、Git tagね。(やべ、全く知らねー。。)

ということでGit tagを学びたいと思います。

Git タグ


vagrantにgit cloneします。

[vagrant@localhost test]$ git clone
Initialized empty Git repository in /home/vagrant/local/test/test/.git/
remote: Enumerating objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 3
Unpacking objects: 100% (3/3), done.

1.git tagの一覧表示
コマンドラインでgit tagと打ちます。何も表示されません。タグはついていない状態です。

[vagrant@localhost test]$ git tag

git cloneしたファイルを適当に編集します。

echo "this is test<br>";
echo "addign git tag!";

2.git add .
[vagrant@localhost test]$ git add .

3.git commit -m “comment”
git commit します。
[vagrant@localhost test]$ git commit -m “tag commit”
[master a74bdba] tag commit
Committer: vagrant
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

git config –global “Your Name”
git config –global

If the identity used for this commit is wrong, you can fix it with:

git commit –amend –author=’Your Name

1 files changed, 2 insertions(+), 1 deletions(-)

4.git tag -a でタグ作成
git tag -a tagname -m “comment”でタグを生成します。
[vagrant@localhost test]$ git tag -a gittag -m “first tag”

5.git tagでタグ一覧表示
[vagrant@localhost test]$ git tag

git remote set-url origin hogehogeとしてから、git pushします。
[vagrant@localhost test]$ git remote set-url origin
[vagrant@localhost test]$ git push -u origin master
Counting objects: 5, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 291 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
e44f89c..a74bdba master -> master
Branch master set up to track remote branch master from origin.

7.tag も git push
[vagrant@localhost test]$ git push origin gittag
Counting objects: 1, done.
Writing objects: 100% (1/1), 161 bytes, done.
Total 1 (delta 0), reused 0 (delta 0)
* [new tag] gittag -> gittag