From: "Paul Vincent Craven" <paul@cravenfamily.com>
To: git@vger.kernel.org
Subject: Question with git push
Date: Tue, 23 Dec 2008 10:59:10 -0600 [thread overview]
Message-ID: <5591393c0812230859n3b50b1f9k36153f40dd75ff57@mail.gmail.com> (raw)
If I do a 'git push' to another repository, my changes are reverted
the next time that repository is updated, unless I do a hard reset on
the remote repository first. Of course, then I would lose my changes
in the remote repository. What is the correct way of handling this?
A quick example:
mkdir -p RepositoryA/files RepositoryB
cd RepositoryA/files
echo "Test file" > test1.txt
git init
git add .
git commit -a -m "Test Commit 1"
cd ../../RepositoryB
git clone ../RepositoryA/files
cd files
# I want this change to go to RepositoryA
echo "More data" >> test1.txt
git add .
git commit -a -m "Test Commit 2"
git push ../../RepositoryA/files
cd ../../RepositoryA/files
echo "Test file" > test2.txt
git add .
# This commit reverts test1.txt to not have "More data"
git commit -a -m "Test Commit 3" # This reverts test1.txt to not
git diff master^ master
How do I change my commands so I keep the change I made in RepositoryB?
Thanks,
--
Paul Vincent Craven
--
Paul Vincent Craven
http://www.cravenfamily.com
next reply other threads:[~2008-12-23 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-23 16:59 Paul Vincent Craven [this message]
2008-12-23 17:35 ` Question with git push Peter Harris
2008-12-23 17:37 ` demerphq
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5591393c0812230859n3b50b1f9k36153f40dd75ff57@mail.gmail.com \
--to=paul@cravenfamily.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).