Wednesday 15 August 2012

How to `git reset` After `git merge --no-commit --no-ff` -


I'm a newbie for git. I was working on a branch that used to run a lot of code, including the old removal and New files were also included. So I actually decided to do a dry trick of a Gita merge before merging:

I did not have to go to GIT merge - no-comi- no-FF & lt; MyBranchName & gt; Run . When I took part, I showed some conflicts. Then I took the position of GIT and the result was:

  MyMicBook-Pro: [Master] $ git position # on branch master # You have unarmed the path # "Git commit" play) # # Changes to change: # Modified: General / TP.FPP # Deleted: General / Models / Job / Request. PHP # New File: Normal / DP # PHP # # Unheard Path: # (Use "git add / rm & lt; file & gt; ..." as the resolution is correct) # # Modified both: .gitignore # Both added: build / release / current / production.sql # deleted by them: General / Service / DFPASPAdapter.php # Both Modified: Common / Ze.php # They are deleted by: General / Models / Providers / DFPASP Php   

then to undo the git (which was due to the git merge dry part), I got the git Reset HEAD but afterwards I realized / realized that before returning to the forum, before the master's branch was merged (ie what is committed for the master), I have to reset the git reset to the hard head After reset, git status shows the following:

  # branch master # untracked files: # ("git add " Use; ... "to include what will be included) # # build / release / running / upgrade.php # normal / F1 PHP # Normal / F2 PHP # Normal / F3 PHP was added to do nothing but untrack file exists (use "git add" to track)   

The aforementioned files are F1, F2, F3 and Upgrade The FTP was added to that branch which I was working on. I was hoping that git reset - hard head should be forgotten about anything related to the branch, which I merge the mix (dry part) to the master branch Was trying to do.

Is such a thing possible? Am I missing something in the concept? And what I left with the sole option of manually deleting files? Any help would help me understand more! Thanks!

GIT does not know about files that are not indexed, to remove files related to the current branch For, with non-tracked people, run

  git clean -fd    

No comments:

Post a Comment