GIT questions You work for a software company and before you

GIT questions

You work for a software company, and before you leave to go home you pushed your latest code to the remote repository. Assuming there were people still working and pushing code to the remote repository after you leave, what Single git command do you need to enter in order to update your local repository (on the master branch) when you return in the morning? What are the three steps of the git workflow to perform when you have a new file you want to include as part of your repository? True or False. Your code on your local repository is visible to other programmers. True or False. Only you can access the branches that you created in the remote repository. 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 committed. 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 pull origin master

2.

git add newfile

git commit -m \"new file added\"

git push origin master

3. False. Only code pushed to central repository is visible to others.

4. False. Remote branches are accessible to all members.

GIT questions You work for a software company, and before you leave to go home you pushed your latest code to the remote repository. Assuming there were people

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site