GIT questions Charly and Danny are working in parallel on a
GIT questions
Charly and Danny are working in parallel on a coding project from different computers, but sharing the same remote repository. Charly just changed several files and performed a \'git commit\' in his working directory. Danny then performs a \'git pull\'. Can Danny see the changes that Charly did? Explain your reasonings. While programming in java, whenever you compile your code you create a massive amount of \".class\" files. You want your repository to be as maintained and clean as possible, so you want to avoid \".class\" files being added to your repository, while ensuring your \'git status\' will not consider them when displaying files to be added or comitted. What file do you need to edit? What is the one line you need to add to that file to ignore all the \".class\" files?Solution
1.Git is really good at handling merges and fixing conflicts
* In this scenario charly just commit the files in his working directory. But he dnt push the fies in repository. so eventhough Danny performs a git pull he cant able to see the changes.
* We need to commit, push and then pull.
2. Before Ignoring the files make sure that your .class files were not already added to the index.
(a) We need to edit java.class files.
(b) *IF you want to remove given file from the repository (after pushing), use the following comments
git rm --cached name_of_file.
*If you don\'t want any .class file then use the following comments
git rm -r --cached *.class
