Pulling
Last updated
Last updated
Pulling gives you a local snapshot of your remote repository. It is automatically performed after you clone. It is an operation performed via the Copia Desktop App on your local PC.
Each time you intend to make changes to a repository from a given machine, you'll want to pull changes locally. This way, multiple engineers from the same team can reference and collaborate on the same remote repository.
Once you start to collaborate with other users, you'll both be making changes to the same repository and often at the same time. In order to stay synchronized, you should make a habit of always pulling before pushing. This gives you an opportunity to check for remote changes before you try to push changes you've made locally, and it ensures that your local repository will always be up to date with what's on Copia's servers.
Pulling changes when you have no local changes is straightforward.
To pull changes from the Copia server, press the Fetch Origin button. The Desktop App will check the remote repository for any changes.
This fetching operation only checks the remote repository; it doesn't bring in the changes locally. You therefore still need to pull the remote changes. To do so, press either of the Pull Origin buttons.
If you've made changes locally and in that time someone else on your team has also pushed their change to remote, you will first need to commit (or save your change) locally, and then pull changes from remote.
To learn more about commits, check out the Committing section.
At times, when you attempt to pull, you'll discover that you've modified a file that someone else has already modified. You'll get the following warning.
You'll want to select your local version (the option NOT prefixed with origin/
) and merge the files in. This will create a new commit. You can then navigate to the History tab to understand what you changed. We recommend you create another commit with the changes from remote that you overrode before pushing.
While this process can be confusing, we recommend that you begin to use branching, code review, and merging flow which make it much cleaner to compare changes and resolve merge conflicts.