Y
Y
Yaroslav2016-12-20 20:53:11
git
Yaroslav, 2016-12-20 20:53:11

Why is there an error in adding changed files to a previous commit?

I'm working on the master branch. At the current stage of development, a certain stage is indexed, a commit is made and launched into the repository.
Next, I change the files and want to add them to the previous commit
I do git add .
Next $ git commit --amend
No rules in editor, save and exit
Status says:
On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 1 different commits each, respectively. (use " git
pull" to merge the remote branch into yours) nothing to
commit, working tree clean /test.git '
How to add changed files to previous commit and push?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor, 2016-12-20
@YarkoDzech

git push --force

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question