Skip to contentSkip to conversation

How to push changes from clone back to master

DISCUSSION Simon C 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore

Simon C

author
#0 lore raw

I created master branch in git:

mkdir git_master;
cd git_master
git init
git add .
git commit

create a clone
git clone . ../git_clone1
create newfile
git add newfile
git commit .

then try to propagate changes to master
git push

it gave me some warning, and subsequent git push says everything is up to date.
but I do not see the new file under git_master

Signature · 2 lines
View this message in context: http://n2.nabble.com/How-to-push-changes-from-clone-back-to-master-tp4275010p4275010.html
Sent from the git mailing list archive at Nabble.com.
#1 lore raw
Quoted 16 lines · Simon C

I created master branch in git:

mkdir git_master;
cd git_master
git init
git add .
git commit

create a clone
git clone . ../git_clone1
create newfile
git add newfile
git commit .

Quoted 6 lines

then try to propagate changes to master
git push

it gave me some warning, and subsequent git push says everything is up to date.
but I do not see the new file under git_master

If you asked that question in the official IRC channel, the answer would be 'faq non-bare', which would cause the bot to send you a link to this entry in the Git FAQ:
http://git.or.cz/gitwiki/GitFaq#Whywon.27tIseechangesintheremoterepoafter.22gitpush.22.3F

tom

author
#2 lore raw

Tomas,

How do I push code to master then, do I do got reset - hard on the master??

Simon

Quoted 30 lines · Tomas Carnecky
Quoted 16 lines · Simon C

I created master branch in git:

mkdir git_master;
cd git_master
git init
git add .
git commit

create a clone
git clone . ../git_clone1
create newfile
git add newfile
git commit .

Quoted 4 lines

then try to propagate changes to master
git push

it gave me some warning, and subsequent git push says everything

is up to

Quoted 2 lines

date.
but I do not see the new file under git_master

If you asked that question in the official IRC channel, the answer would be 'faq non-bare', which would cause the bot to send you a link to this entry in the Git FAQ:
http://git.or.cz/gitwiki/GitFaq#Whywon.27tIseechangesintheremoterepoafter.22gitpush.22.3F

tom

#3 lore raw
Quoted 9 lines · Simon Chu
Quoted 4 lines · Tomas Carnecky

If you asked that question in the official IRC channel, the answer would be 'faq non-bare', which would cause the bot to send you a link to this entry in the Git FAQ:
http://git.or.cz/gitwiki/GitFaq#Whywon.27tIseechangesintheremoterepoafter.22gitpush.22.3F

How do I push code to master then, do I do got reset - hard on the master??

(Please do not top post).

If you asked that question on the IRC, the answer would be 'faq mothership-satellite', which would cause the bot to send you a link to this entry in the Git FAQ:

push is reverse of fetch. See
http://git.or.cz/gitwiki/GitFaq#mothership-satellite

This link is recommended by the entry Tomas gave you, so I am having this sad feeling that you wouldn't read it either... Sigh.