Git merge and diff












1















I have a question about the use of git.



Actually I have two branch in my repository (feature-2, feature-certification). Now I've received a source code from another user and I need to compare his files with my branch (feature-certification). Those files are not under git or remote branch, it's just a folder with files.



What I tried:
I created a new branch and added all the files that I've received then I pushed to the new branch but when I tried to merge into feature-certification I noticed that ALL files are treated like new even when they're not new



Is there any way to check the diff between my branch and the files of the other folder that I have?










share|improve this question























  • Did you put them in the same folder? Or different folders?

    – evolutionxbox
    Nov 22 '18 at 3:38











  • Actually I have my working repo in one directory and the source code that I've received in other folder

    – Dex Sebas
    Nov 22 '18 at 3:38











  • That’s why then. As you’ve added new files, not updated any.

    – evolutionxbox
    Nov 22 '18 at 3:40











  • How should I proceed? In my working directory just copy and paste the new files? (This would replace some files)

    – Dex Sebas
    Nov 22 '18 at 3:41


















1















I have a question about the use of git.



Actually I have two branch in my repository (feature-2, feature-certification). Now I've received a source code from another user and I need to compare his files with my branch (feature-certification). Those files are not under git or remote branch, it's just a folder with files.



What I tried:
I created a new branch and added all the files that I've received then I pushed to the new branch but when I tried to merge into feature-certification I noticed that ALL files are treated like new even when they're not new



Is there any way to check the diff between my branch and the files of the other folder that I have?










share|improve this question























  • Did you put them in the same folder? Or different folders?

    – evolutionxbox
    Nov 22 '18 at 3:38











  • Actually I have my working repo in one directory and the source code that I've received in other folder

    – Dex Sebas
    Nov 22 '18 at 3:38











  • That’s why then. As you’ve added new files, not updated any.

    – evolutionxbox
    Nov 22 '18 at 3:40











  • How should I proceed? In my working directory just copy and paste the new files? (This would replace some files)

    – Dex Sebas
    Nov 22 '18 at 3:41
















1












1








1


1






I have a question about the use of git.



Actually I have two branch in my repository (feature-2, feature-certification). Now I've received a source code from another user and I need to compare his files with my branch (feature-certification). Those files are not under git or remote branch, it's just a folder with files.



What I tried:
I created a new branch and added all the files that I've received then I pushed to the new branch but when I tried to merge into feature-certification I noticed that ALL files are treated like new even when they're not new



Is there any way to check the diff between my branch and the files of the other folder that I have?










share|improve this question














I have a question about the use of git.



Actually I have two branch in my repository (feature-2, feature-certification). Now I've received a source code from another user and I need to compare his files with my branch (feature-certification). Those files are not under git or remote branch, it's just a folder with files.



What I tried:
I created a new branch and added all the files that I've received then I pushed to the new branch but when I tried to merge into feature-certification I noticed that ALL files are treated like new even when they're not new



Is there any way to check the diff between my branch and the files of the other folder that I have?







git merge bitbucket branch






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 '18 at 3:06









Dex SebasDex Sebas

107210




107210













  • Did you put them in the same folder? Or different folders?

    – evolutionxbox
    Nov 22 '18 at 3:38











  • Actually I have my working repo in one directory and the source code that I've received in other folder

    – Dex Sebas
    Nov 22 '18 at 3:38











  • That’s why then. As you’ve added new files, not updated any.

    – evolutionxbox
    Nov 22 '18 at 3:40











  • How should I proceed? In my working directory just copy and paste the new files? (This would replace some files)

    – Dex Sebas
    Nov 22 '18 at 3:41





















  • Did you put them in the same folder? Or different folders?

    – evolutionxbox
    Nov 22 '18 at 3:38











  • Actually I have my working repo in one directory and the source code that I've received in other folder

    – Dex Sebas
    Nov 22 '18 at 3:38











  • That’s why then. As you’ve added new files, not updated any.

    – evolutionxbox
    Nov 22 '18 at 3:40











  • How should I proceed? In my working directory just copy and paste the new files? (This would replace some files)

    – Dex Sebas
    Nov 22 '18 at 3:41



















Did you put them in the same folder? Or different folders?

– evolutionxbox
Nov 22 '18 at 3:38





Did you put them in the same folder? Or different folders?

– evolutionxbox
Nov 22 '18 at 3:38













Actually I have my working repo in one directory and the source code that I've received in other folder

– Dex Sebas
Nov 22 '18 at 3:38





Actually I have my working repo in one directory and the source code that I've received in other folder

– Dex Sebas
Nov 22 '18 at 3:38













That’s why then. As you’ve added new files, not updated any.

– evolutionxbox
Nov 22 '18 at 3:40





That’s why then. As you’ve added new files, not updated any.

– evolutionxbox
Nov 22 '18 at 3:40













How should I proceed? In my working directory just copy and paste the new files? (This would replace some files)

– Dex Sebas
Nov 22 '18 at 3:41







How should I proceed? In my working directory just copy and paste the new files? (This would replace some files)

– Dex Sebas
Nov 22 '18 at 3:41














1 Answer
1






active

oldest

votes


















2















In my working directory just copy and paste the new files?




Yes, as long as your working directory is clean, meaning all your current files are added and committed.



Then you can copy/overwrite your files with the new ones: a git status/git diff will show you the differences.



At any point, you can get back to your original state with git reset --hard.





A less intrusive option would be:



 cd /path/to/my/repo
git --work-tree=/path/to/receives/files/folder diff


That would show you the difference between the common files and your current index.






share|improve this answer


























  • Thank you ! I made that way and it works

    – Dex Sebas
    Nov 22 '18 at 5:36











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53423297%2fgit-merge-and-diff%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2















In my working directory just copy and paste the new files?




Yes, as long as your working directory is clean, meaning all your current files are added and committed.



Then you can copy/overwrite your files with the new ones: a git status/git diff will show you the differences.



At any point, you can get back to your original state with git reset --hard.





A less intrusive option would be:



 cd /path/to/my/repo
git --work-tree=/path/to/receives/files/folder diff


That would show you the difference between the common files and your current index.






share|improve this answer


























  • Thank you ! I made that way and it works

    – Dex Sebas
    Nov 22 '18 at 5:36
















2















In my working directory just copy and paste the new files?




Yes, as long as your working directory is clean, meaning all your current files are added and committed.



Then you can copy/overwrite your files with the new ones: a git status/git diff will show you the differences.



At any point, you can get back to your original state with git reset --hard.





A less intrusive option would be:



 cd /path/to/my/repo
git --work-tree=/path/to/receives/files/folder diff


That would show you the difference between the common files and your current index.






share|improve this answer


























  • Thank you ! I made that way and it works

    – Dex Sebas
    Nov 22 '18 at 5:36














2












2








2








In my working directory just copy and paste the new files?




Yes, as long as your working directory is clean, meaning all your current files are added and committed.



Then you can copy/overwrite your files with the new ones: a git status/git diff will show you the differences.



At any point, you can get back to your original state with git reset --hard.





A less intrusive option would be:



 cd /path/to/my/repo
git --work-tree=/path/to/receives/files/folder diff


That would show you the difference between the common files and your current index.






share|improve this answer
















In my working directory just copy and paste the new files?




Yes, as long as your working directory is clean, meaning all your current files are added and committed.



Then you can copy/overwrite your files with the new ones: a git status/git diff will show you the differences.



At any point, you can get back to your original state with git reset --hard.





A less intrusive option would be:



 cd /path/to/my/repo
git --work-tree=/path/to/receives/files/folder diff


That would show you the difference between the common files and your current index.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 22 '18 at 5:36

























answered Nov 22 '18 at 5:34









VonCVonC

833k29026233166




833k29026233166













  • Thank you ! I made that way and it works

    – Dex Sebas
    Nov 22 '18 at 5:36



















  • Thank you ! I made that way and it works

    – Dex Sebas
    Nov 22 '18 at 5:36

















Thank you ! I made that way and it works

– Dex Sebas
Nov 22 '18 at 5:36





Thank you ! I made that way and it works

– Dex Sebas
Nov 22 '18 at 5:36


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53423297%2fgit-merge-and-diff%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'