Category Archives: Git

[Git] edit commit message after push

Source: stackopenflow: Changing git commit message after push (given that no one pulled from remote) git comment –amend git push –force

Posted in Git | Leave a comment

[Git] find the file’s latest edited time

Source: stackoverflow: Find when a file was deleted in Git $ git log -1 — o-core/o-service/src/main/java/path/file.java commit 0d5ab0e5d9df7d7b5906ff8db169f43b760daea0 Author: cowman cowman@mitake.com.tw Date: Mon Dec 18 17:58:26 2017 +0800

Posted in Git | Leave a comment

[Git] remove local git tags that are not in remote

git fetch –prune origin “+refs/tags/:refs/tags/” source: stockoverflow: Remove local tags that are no longer on the remote repository

Posted in Git | Leave a comment

Add git branch name to bash prompt

edit ~/.bash_profile

Posted in CentOS, Git, Linux, Mac, Ubuntu | Leave a comment

[Git] List of changed files with another branch

git diff –name-only branchname

Posted in Git | Leave a comment

[Git] Git command…

git stash: 暫存機制 git stash: 暫存機制,可保留目前狀態,重新取回其他版本的code git stash clear: 清除所有暫存空間 git stash drop {git status name}: 清除指定的暫存狀態,如果不加參數,則刪除最近的那一個 git stash list: 查看目前暫存列表 git stash apply {git stash name}: 取回暫存的狀態,如果不加參數,則抓取最近的版本 git stash show {git stash name}: 查看指定的暫存與parent差異的部分,如果不加參數,則顯示最近的那一個版本 git stash branch {git stash … Continue reading

Posted in Git | Leave a comment

git push 失敗

當要push的時候發生了一點錯誤….

查看git status發現沒有問題

執行rebase重新建立看看

執行stash查看是什麼問題

選擇本低端的版本

後面就一般動作推上去了

Posted in Git | Leave a comment

GitLab – Requirements

Source : Hardware requirements CPU 1 core works supports up to 100 users but the application can be a bit slower due to having all workers and background jobs running on the same core 2 cores is the recommended number … Continue reading

Posted in Git | Leave a comment

Git Server 安裝 (New)

OS: Ubuntu 14.04 Server x64 安裝Gitlab + MySQL + Nginx 系統更新

安裝基本需求

安裝python

安裝Git

安裝Ruby

新增Gitlab系統帳號

安裝GitLab Shell

安裝MySQL Database

安裝GitLab

設定GitLab

GitLab DB設計

安裝Gems

初始化 Database

Continue reading

Posted in Git, Nginx, Ubuntu | Leave a comment

Gitlab改使用GMail SMTP

檢查 config/environments/production.rb 檔案,查看 config.action_mailer.delivery_method = :sendmail 的註解是否已增加,關閉Gitlab sendmail寄送服務 config.action_mailer.delivery_method = :sendmail [註] 使用這一篇 使用GMail SMTP寄信 (Ubuntu) 的方法應該也可以~但是目前會出現 “Mail failure – no recipient addresses” A message that you sent using the -t command line option contained no addresses that were not … Continue reading

Posted in Git, Ubuntu | Leave a comment