Solved

while using git , i want to neglect some files at git to track which prevents me making fast pulls, and forces me to stash, how do i avoid this?

Posted on 2015-01-09
3
184 Views
Last Modified: 2015-02-01
Hi,

i am new to version control system git, and source tree... i want to ask 2 issues,

in git bash, command prompt , any time i try to make a pull it asks for username and password , how do i disable this and avoid asking each time for passwords ?

second question is whenever i make changes to my code and pull changes ,it gets an error sayying that there are changes should be removed or stashed etc.. so these are either configuration files or dll files which i dont want to commit and change the contents but it forces me to stash them before i can make a pull. how do i avoid this?

thank you
0
Comment
Question by:nicedone
  • 2
3 Comments
 
LVL 29

Expert Comment

by:fibo
ID: 40540676
Question 1: is the remote you are pulling from registered in the git profile? check with "git config -l"

Not sure if you are using Git from windows or linux.
From windows, you probably have "git gui" in addition to "git bash" (try typing "git gui" from bash)


Question 2: you need to establish some "clean" reference situation so that all dlls, config, etc are either synced or ignored
use the file .gitignore at the root of your project to define which files or directories should be ignored by the tracking system

(To easily ignore files, I personally use TortoiseGit in addition to git bash/ git gui. Be careful though: Do NOT use Tortoise to push, it badly handles conflicts)
0
 

Author Comment

by:nicedone
ID: 40540719
Hi,

For question  1:   Yes it is registered in the git profile when i hit git config -l ,my profile as well as all the repository information has appeared,

i also typed git gui ,i guess this is an interface for git bash ? but i found soucetree way more easy and more functions available on the interface somehow?

For second question : I make a change to a config file, but i dont want to commit this change ,i dont want to push my config change to other developers but on the side i want to run this file on my own desired settings only so in that case ,ignore would work but then it will affect every one , so the file will be ignored in all system which i would not desire?

how can i resolve this ? thanks again
0
 
LVL 29

Accepted Solution

by:
fibo earned 500 total points
ID: 40543913
question 1: how are you syncing the repositories? thru http: ?
could you place here an edited copy of the output of config -l
(just list the infos for the repository, mail addresse etc, but obfuscate most info)

question 2: before making a pull or a push, you can hide your changes by using "stash"

Another solution would be to "branch" your changes, but this has side effects as well

My 2c on tools:
- I don't know sourcetree, so no comment
- tortoisegit: great to ignore files, and to diff files, with only a right-click. VERY BAD FOR PUSHING since it badly handles conflicts. Do not use Tortoise for pushing changes! Very great to handle any conflicted file (as opposed to a conflicted commit)
- git-gui: great to commit / push files... after their status has been solved with git bash. handling pulls not very evident. The best tool to easily see changes in files
- git bash: great to pull, and to index directories in coherent ways (then commit them with git-gui)
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now