@@ -185,7 +185,9 @@ def rename(self, new_name):
185185
186186 def update (self , ** kwargs ):
187187 """
188- Fetch all changes for this remote, including new branches
188+ Fetch all changes for this remote, including new branches which will
189+ be forced in ( in case your local remote branch is not part the new remote branches
190+ ancestry anymore ).
189191
190192 ``kwargs``
191193 Additional arguments passed to git-remote update
@@ -196,6 +198,64 @@ def update(self, **kwargs):
196198 self .repo .git .remote ("update" , self .name )
197199 return self
198200
201+ def fetch (self , refspec = None , ** kwargs ):
202+ """
203+ Fetch the latest changes for this remote
204+
205+ ``refspec``
206+ A "refspec" is used by fetch and push to describe the mapping
207+ between remote ref and local ref. They are combined with a colon in
208+ the format <src>:<dst>, preceded by an optional plus sign, +.
209+ For example: git fetch $URL refs/heads/master:refs/heads/origin means
210+ "grab the master branch head from the $URL and store it as my origin
211+ branch head". And git push $URL refs/heads/master:refs/heads/to-upstream
212+ means "publish my master branch head as to-upstream branch at $URL".
213+ See also git-push(1).
214+
215+ Taken from the git manual
216+
217+ ``**kwargs``
218+ Additional arguments to be passed to git-fetch
219+
220+ Returns
221+ self
222+ """
223+ self .repo .git .fetch (self , refspec , ** kwargs )
224+ return self
225+
226+ def pull (self , refspec = None , ** kwargs ):
227+ """
228+ Pull changes from the given branch, being the same as a fetch followed
229+ by a merge of branch with your local branch.
230+
231+ ``refspec``
232+ see 'fetch' method
233+
234+ ``**kwargs``
235+ Additional arguments to be passed to git-pull
236+
237+ Returns
238+ self
239+ """
240+ self .repo .git .pull (self , refspec , ** kwargs )
241+ return self
242+
243+ def push (self , refspec = None , ** kwargs ):
244+ """
245+ Push changes from source branch in refspec to target branch in refspec.
246+
247+ ``refspec``
248+ see 'fetch' method
249+
250+ ``**kwargs``
251+ Additional arguments to be passed to git-push
252+
253+ Returns
254+ self
255+ """
256+ self .repo .git .push (self , refspec , ** kwargs )
257+ return self
258+
199259 @property
200260 def config_reader (self ):
201261 """
0 commit comments