0

I am using Git ( GUI GitKraken) with cPanel.

In cPanel public_html/web I have git repository created using commands:

mkdir ~/web

cd web

git init

git config receive.denyCurrentBranch updateInstead

Now in my laptop, i cloned via GitKraken to www directory of xammp localhost server. Idea is to make changes in site locally and push those chnages to live site via Git.

Everything was working fine last night, but today remote server files are not updating(showing pushed changes). Git says its been pushed successfully to origin, but files are not updating.

Note: I have 3 branches in my Local Repo:

  • master,
  • version2. 1,
  • version2. 2,

and i am pushing these to master branch of remote repo.

  • Did you fetch/pull the changes at your remote system? To which branch did your commit and pull the changes? Has the branch with the changes an remote Branch? –  Sep 25 '17 at 10:06
  • I am only pushing changes from local to remote ( local version2.2 to remote master ). I commit in the local version2.2 branch. Only Local branch(version2.2) are being updated. Please Note: I have only master branch in remote repo. – Navneet Yadav Sep 25 '17 at 11:30
  • screenshot: http://take.ms/8nLFo – Navneet Yadav Sep 25 '17 at 11:33
  • Note: At your Screenshot you merged the master branch into the branch 'online-v2.1'. But you have to merge the branch 'online-v2.1' into master to push your changes to the remote to fetch and pull your changes there. –  Sep 25 '17 at 11:44
  • Thank you for your help. If you don't mind. I have an off-topic question, which is the best git client for mac.. any suggestion? – Navneet Yadav Sep 25 '17 at 17:17
  • The best way to learn git is to use the command line but SourceTree is a good git client for mac. –  Sep 26 '17 at 05:12

1 Answers1

3

From your comment I see there are two Solutions for your Problem:

  1. Merge your local branch 'version2.2' to the master branch and push it to remote. Fetch & Pull it on your remote System.
  2. Push your local branch 'version2.2' to the remote with git push -u origin version2.2 After that you have to create and checkout the local branch on your remote System and pull the changes,the local branch "version2.2" also have to track the remote branch remote branch 'version2.2'. All of this you can do with this command: git checkout --track origin/version2.2

You are able to do all of these steps in gitkraken too (without using the command line)