I have a tricky situation. I need to remove and re-commit some commits that I already pushed to github remote repo. But these commits are not HEAD anymore (people pushed theirs on top of it).
I understand I can do revert commits, therefore…
In our project, using master and develop branches, a commit has been made directly on master (only three files, and those changes are also on develop branch).
Now I need to merge develop to master, but I cannot since the history for master is now…
I did a revert to a commit (pushed to remote of course).
Then I saw after 2 new commits that someone modified the code that my commit reverted without an intermediate revert of my revert.
How is this done?
I found some questions about how to revert with Git, but those questions always needs human interaction or to need to which revision are you going to revert. In this case there is no human interaction and you are not telling the machine to which…
Suppose I have performed the following steps (in a git repository);
make changes on a branch, commit these changes
create new branch and move there,
push these changes to the new branch and submit and merge request into the previous branch
checkout…
I have 5 branches master, branch-1, branch-2, branch-3 and branch-4.
I made some changes to branch-3 and merged to master and again did it twice, now I want to go back to the stage before all the 3 merge, I can checkout to that commit and create…
I am on branch "master".
I had such git history:
333 (#82)
444 (#83)
Then I done some commits and reverts (222->111->010->789->456->123):
123 Revert "(#84)"
456 Revert "(#81)"
789 Revert “(#81)"
010 Revert "(#86)"
111 (#86)
222 (#84)
333 …
We are working on a repository with a fellow programmer which he commits to a separate branch and I on the master.
A few days ago he decided to merge master into his branch but after merging faced some environmental dependency issues and decided to…
I changed something in a file, and did not use add or commit. Some part of my changes is not necessary, how can I only reset this part. (I know how to revert the whole file, but the file has many changes and only a little change must be reset.…
I created a repository, added some commits, pushed to GitHub.
Later, I created a new project, new local git repository and I wanted to commit new files from new repository to the old repository on GitHub. So I executed:
git push --force origin…
So i was checking for other solutions but it's not exactly suited for me I'm also dealing with a branch merge
git log
commit 6d034e1b1f03241b2c660312660ce29acca23f60
Author: ME
Date: Thu Jun 30 13:09:08 2016 +0100
text…
I deploy the code in one of my server with according to this tutorial:
How To Set Up Automatic Deployment with Git with a VPS
But now i have problems with some commit pushed to deploy server, some times the code inside of the githooks, make that…
Repo: mergetest
$pwd
/gitvobs/mergetest/apple
$git status
On branch br1
Changed but not updated:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
**modified: inside**
$git…
I was working simultaneously on a Feature branch and Master branch.
Few days ago I merged my Feature into Master. A few commits have been made on top of that too.
But later I realised that the feature is no more desired. So I need to remove the…
os:mac 10.11.5
ide:idea 2016
in idea , i write some code , then i want to commit it .
use command line
git status
show me
On branch master Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
modified: …