Answers
Here are the answers to the questions given above:
- Use
git init
,git add .
, andgit commit
to create a repository from existing files. Usegit clone
to get your own copy of the existing repository. - Use
git commit
orgit commit -a
to create a new revision, and usegit push
to publish changes. - Use
git fetch
to get updates from other developers, orgit pull
to get updates and merge them together. Usegit merge
(or, as mentioned in later chapters,git rebase
) to combine changes. - Merge conflicts are presented using the
<<<<<<<
,=======
, and>>>>>>>
markers; you can also find the|||||||
marker used, depending on the configuration. To resolve the conflicts, you need to edit files marked as conflicting into shape, usegit add
on them when finished, and then finalize the merge withgit commit
orgit merge --continue
(or rebase withgit
rebase --continue
). - To make Git ignore specific types of files, you need to add appropriate...