All Git Articles

This page is a page which contain all articles about Git Versioning Control and all things related on it :

Tips and Trick

  1. How to Initialize a Local Git Repository .
  2. How to clone or duplicate a Git repository .
  3. How to Push Local Git Repository to Remote Git Repository.

Error

  1. How to solve “change not stated for commit” in git commit operation.
  2. How to solve Git push Error Message [remote rejected] master -> master .
  3. How to solve Error Message fatal: Dirty repository: Having uncommitted changes. Exiting… upon executing git ftp push.

 

git commit changes not staged for commit Message

This is an article where the commit process is stumbled upon a message stated as in the title of this article. When performing an operation including moving folders, files and even deleting several folders and files, there are operations which is actually doesn’t included into the staging area in the git commit execution as shown below :

git commit -m "Modifying Folder's Structure"

Below is the execution of the command :

user@hostname:/home/user/source$ git commit -m "Source Modification"
[master 620729e] Source Modification
13 files changed, 11 insertions(+)
create mode 100644 app/Application.php
...
user@hostname:/home/user/source$

After committing the already changed files, push it to the Repository Git :

user@hostname:/home/user/source$ git push --set-upstream application
Username for 'http://app.repository.com': user
Password for 'http://[email protected]':
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 1.28 KiB | 0 bytes/s, done.
Total 6 (delta 1), reused 0 (delta 0)
To http://app.repository.com/gitlab/user/application.git
50e9f83..620729e master -> master
Branch master set up to track remote branch master from application.
user@hostname:/home/user/source$ git-ftp push
fatal: Dirty repository: Having uncommitted changes. Exiting...
user@hostname:/home/user/source$ git-ftp push
fatal: Dirty repository: Having uncommitted changes. Exiting...
user@hostname:/home/user/source$ git commit -m "Source Modification"
On branch master
Your branch is up-to-date with 'application/master'.
Changes not staged for commit:
deleted: resources/views/sidebar.blade.php
deleted: resources/views/test/index.blade.php
deleted: resources/views/test/edit.blade.php
deleted: resources/views/test/show.blade.php
deleted: resources/views/test/update.blade.php
no changes added to commit
user@hostname:/home/user/source$

There are some error message shown in the above output of commit process : “fatal: Dirty repository: Having uncommitted changes.”. The changes which is an addition and modification of folders and files are being processed but not the deletion process. It is also shown in the output above : “Change not stated for commit”, it consist of files which are deleted. So, there are nothing in the staging area which involving the deletion process are being committed.

Continue reading

Git push Error Message [remote rejected] master -> master

This is an article which is written to handle or to solve the problem generated when someone is using Git version control utility to push either files or folders to a Git repository server. The main purpose for executing ‘push command’ is for updating remote refs along with the associated objects. But eventually pushing those files or folders triggered an error message as shown in the title of this article. So, git utility is utilized to push files or folders and suddenly an error message generated : ‘[remote rejected] master->master’. Below is the actual process happened :

  1. After adding and committing files, folders exist in the folder associated or initialized for Git version control, the last action is to push it to remote Git repository. Below is the command pattern :

Continue reading

How to Grant Access to Gitlab Repository

Gitlab repository is a software built for managing git repositories in a centralized server equipped with issue tracking, wiki, etc. Holding the concept of continuous integration and continuous development, the software is quite handy and useful. In this article, there is a specific task which is very important as the first step for managing git repositories using Gitlab. That specific task is a task on how to grant access to Gitlab repository. As we already knew, files or folders are maintained in a certain repository. That specific repository where every each of them have their own rules for user whom can be permitted and for user whom is forbidden to access and perform operations on that repository. So, if a specific repository need to be accessed using a certain user, there is several things need to be done before the actual access to that specific repository can be done. Below is how to grant access to a Git repository for a certain user which is done from Gitlab Git repository management.

1. Access Gitlab Git repository management. Below is the image of Gitlab Git repository management :

How to Grant Access to Gitlab Repository

Continue reading

How to Perform Automatic Deployment with Git

This article will discuss the automatic deployment that can be performed using Git version control. This article itself inspired by the writing which is posted in the article titled ‘How to Set Up Automatic Deployment with Git with a VPS’ in this link.

This article will describe the scenario which is a simple scenario and based on the scenario itself, it an be developed later on to be adjusted with the real implementation of the automatic deployment according to the need and the condition associated.

The image depicting the scenario which is going to be described in this article can be shown as follows :

Continue reading